@import "base.css";

:root {
    --menu-height: 20px;
}

.banner-wrapper,
.find-my-wrapper,
.magnetic-wrapper,
.control-wrapper,
.package-wrapper {
    position: relative;
    font-size: 0;
}

.banner-content {
    position: absolute;
    top: 30%;
    left: 12%;
}

.find-my-content {
    position: absolute;
    top: 30%;
    left: 12%;
}

.magnetic-content {
    position: absolute;
    top: 30%;
    right: 7%;
}

.control-content {
    position: absolute;
    top: 30%;
    left: 12%;
}

.find-my-content .title,
.magnetic-content .title,
.control-wrapper .title {
    color: #6713c9;
    font-size: var(--font-size-title);
    margin-bottom: 10%;
}

.banner-content .title {
    color: #fff;
    background: #6713c9;
    padding: 10px 20px;
    font-size: 60px;
    margin-bottom: 10%;
    border-radius: .5rem;
}

.banner-content .desc,
.find-my-content .desc,
.magnetic-content .desc,
.control-wrapper .desc {
    color: #666;
    font-size: var(--font-size-desc);
}

.banner-content .desc {
    color: #fff;
}

.parameter-wrapper {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 40px;
    min-height: 600px;
    margin: 6.25rem 9.375rem;
}

.parameter-wrapper .left-panel,
.parameter-wrapper .right-panel {
    height: 100%;
}

.parameter-wrapper .right-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 40px;
    height: 100%;
}

.left-panel {
    display: flex;
    flex-direction: column;
    background: #f3f3f3;
    padding: 1.25rem;
    border-radius: 12px;
}

.left-panel .top-content {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
    margin-bottom: 2.25rem;
}

.left-panel .bottom-content {
    display: flex;
    justify-content: center;
}

.left-panel .bottom-content img {
    width: initial;
    max-width: 100%;
}

.left-col,
.right-col {
    background: #f3f3f3;
    padding: 1.25rem;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.right-col {
    display: flex;
    flex-direction: column;
}

.right-col .para-content {
    flex: 4;
}

.right-col-inner {
    transition: transform 0.3s;
    will-change: transform;
}

.right-col:hover .right-col-inner {
    transform: scale(1.1);
}

.para-title {
    font-size: var(--font-size-desc);
    color: #6713c9;
}

.para-desc {
    font-size: var(--font-size-title);
    font-weight: 500;
    word-break: break-word;
}

span.small {
    font-size: 1.5rem;
}

.para-logo {
    display: flex;
    justify-content: end;
    /* 图片在其容器内右对齐 */
    flex: 1;
    text-align: right;
    margin-top: 4.375rem;
}

.para-logo>img {
    max-width: 100%;
    width: 54px;
    display: block;
}


/* @media (max-width: 1600px) {
    .find-my-content{
        top: 20%;
    }
}


@media (max-width: 1440px) {
    .find-my-content{
        top: 20%;
    }
    .magnetic-content{
        right: 9%;
    }

    .control-content{
        left: 9%;
    }
}

@media (max-width: 1024px) {
    .product-img img {
        height: 78%;
    }
} */

.product-img {
    z-index: 10;
}

@media (max-width: 768px) {

    .banner-content {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .banner-content .title {
        font-size: var(--font-size-module-title);
    }

    .parameter-wrapper,
    .parameter-wrapper .right-panel {
        gap: 20px;
    }

    .parameter-wrapper {
        grid-template-columns: 1fr;
        min-height: auto;
        margin: 1rem .26rem;
    }

    .left-panel .top-content {
        flex-grow: 1;
    }

    .left-panel .bottom-content {
        flex-grow: 1;
        display: flex;
        justify-content: center;
        padding: 10px;
    }


    .find-my-content,
    .magnetic-content,
    .control-content {
        /* font-size: .853rem; */
        left: 50%;
        top: 25%;
        transform: translate(-50%, -50%);
        display: none;
    }

    .magnetic-content {
        right: 0;
    }

    .find-my-content .title,
    .magnetic-content .title,
    .control-wrapper .title {
        /* font-size: 0.853rem; */
        white-space: nowrap;
    }

    /* .find-my-content .desc,
    .magnetic-content .desc,
    .control-wrapper .desc {
        display: none;
    } */

    .right-col {
        display: flex;
        flex-direction: column;
    }

    .right-col .para-content {
        flex-grow: 3;
    }

    span.small {
        display: none;
    }

    .left-panel .top-content{
        margin-bottom: 2rem;
    }

    .left-panel .bottom-content img{
        max-width: 150px;
    }

    .para-logo{
        margin-top: 2rem;
    }

    .para-logo>img,
    .size-logo>img {
        max-width: 32px;
    }
}

.flavors-section {
    position: relative;
    padding: calc(28px + var(--menu-height)) 0 120px;
    scroll-margin-top: var(--menu-height);
    overflow: clip;
}

.flavors-container {
    width: min(1580px, 94vw);
    margin: 0 auto;
}

.flavors-layout {
    display: grid;
    grid-template-columns: minmax(600px, 720px) minmax(600px, 760px);
    justify-content: center;
    gap: clamp(48px, 4vw, 84px);
    align-items: start;
}

.flavors-left {
    width: 100%;
    position: relative;
}

.flavors-right {
    width: 100%;
    position: relative;
}

.flavors-sticky {
    position: relative;
    top: 0;
    transform: none;
}

.flavors-copy {
    max-width: 620px;
    margin-bottom: 42px;
}

.flavors-title {
    margin: 0 0 18px;
    font-size: clamp(42px, 5vw, 74px);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: #5d23b5;
}

.flavors-desc {
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
    color: #222;
}

.flavors-preview {
    display: block;
    min-height: 0;
    border-radius: 24px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.flavors-preview-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    z-index: 2;
}

.flavors-preview-media::after {
    display: none;
}

.flavors-preview-img {
    width: 100%;
    max-width: 760px;
    height: auto;
    object-fit: contain;
    filter: none;
}

.flavors-preview-content {
    display: none;
}

.flavors-grid {
    --hive-overlap: clamp(170px, 9vw, 200px);
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 34px 18px;
    align-items: start;
    padding-top: 0;
}

.flavor-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    /* opacity: 0.48; */
    transform: translateY(0) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
    outline: none;
}

.flavor-item:hover,
.flavor-item.is-active {
    opacity: 1;
    transform: translateY(-2px) scale(1);
    filter: drop-shadow(0 14px 18px rgba(123, 25, 232, 0.16));
}

.flavor-item:hover .flavor-item-card {
    box-shadow: 0px 4px 50px 0px #FF00FFBF;
}

.flavor-item-card {
    width: fit-content;
    min-height: 0;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: none;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
}

.flavor-item-img {
    width: 100%;
    max-width: 168px;
    height: auto;
    object-fit: contain;
    filter: none;
    pointer-events: none;
    user-select: none;
}


/* 每行4格占位：奇数行放1/3列，偶数行放2/4列 */
.flavor-item:nth-child(n) {
    margin-top: 0;
    margin-left: 0;
}

.flavor-item:nth-child(4n + 1) {
    grid-column: 1;
}

.flavor-item:nth-child(4n + 2) {
    grid-column: 3;
}

.flavor-item:nth-child(4n + 3) {
    grid-column: 2;
    margin-top: calc(var(--hive-overlap) * -1);
}

.flavor-item:nth-child(4n + 4) {
    grid-column: 4;
    margin-top: calc(var(--hive-overlap) * -1);
}

@media (min-width: 2560px) {
    .flavors-container {
        width: min(1760px, 86vw);
    }

    .flavors-layout {
        gap: 110px;
    }

    .flavors-grid {
        gap: 28px 22px;
    }
}

@media (max-width: 1680px) {
    .flavors-container {
        width: min(1480px, 94vw);
    }

    .flavors-layout {
        grid-template-columns: minmax(560px, 680px) minmax(560px, 700px);
        gap: 52px;
    }
}

@media (max-width: 1440px) {
    .flavors-layout {
        grid-template-columns: minmax(520px, 640px) minmax(480px, 620px);
        gap: 44px;
    }

    .flavors-grid {
        --hive-overlap: clamp(72px, 6vw, 100px);
        grid-template-columns: repeat(4, minmax(100px, 1fr));
        gap: 20px 16px;
    }

    .flavor-item-card {
        min-height: 220px;
    }
}

@media (max-width: 1280px) {
    .flavors-layout {
        grid-template-columns: minmax(460px, 1fr) minmax(420px, 1fr);
        gap: 28px;
    }

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

    .flavor-item:nth-child(n) {
        margin-top: 0;
        margin-left: 0;
    }

    .flavor-item:nth-child(4n + 1) {
        grid-column: 1;
    }

    .flavor-item:nth-child(4n + 2) {
        grid-column: 3;
    }

    .flavor-item:nth-child(4n + 3) {
        grid-column: 2;
        margin-top: calc(var(--hive-overlap) * -1);
    }

    .flavor-item:nth-child(4n + 4) {
        grid-column: 4;
        margin-top: calc(var(--hive-overlap) * -1);
    }
}

@media (max-width: 1024px) {
    .flavors-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .flavors-left,
    .flavors-right {
        width: 100%;
    }

    .flavors-sticky {
        position: relative;
        top: 0;
        transform: none;
    }

    .flavors-copy {
        max-width: 100%;
    }

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

    .flavor-item:nth-child(n) {
        margin-top: 0;
        margin-left: 0;
        grid-column: auto;
    }

    .flavor-item:nth-child(2n + 1) {
        margin-top: 6px;
    }

    .flavor-item:nth-child(2n + 2) {
        margin-top: 18px;
    }
}

@media (max-width: 768px) {
    .flavors-section {
        padding: 56px 0 80px;
    }

    .flavors-title {
        font-size: 42px;
    }

    .flavors-desc {
        font-size: 16px;
    }

    .flavors-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px 14px;
    }

    .flavor-item:nth-child(2n + 2) {
        margin-top: 0;
    }

    .flavor-item:nth-child(2n + 1) {
        margin-top: 0;
    }

    .flavor-item-card {
        min-height: 0;
    }
}