@charset "utf-8";
.login-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #6C399A;
    color: white;
    padding: 12px 20px;
    border-radius: 999px;
    z-index: 9999;
}

:root {
    --purple: #6C399A;
    --pink: #C34776;
}
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }



        body {
            font-family: 'Baloo 2', cursive;
            background: #FFF6F1;
            color: #4a2f1d;
        }

        a {
            text-decoration: none;
            color: inherit;
        }


.cart-icon-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--pink);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}





        .site-wrapper {
            width: 100%;
        }

        .top-bar {
    background: linear-gradient(90deg, #4a2b18, #3c2415);
    color: #fff;
    padding: 0 30px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.top-links {
    position: absolute;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.top-tagline {
    font-size: 14px;
    white-space: nowrap;
    text-align: center;
}

        .top-links a {
            font-size: 15px;
            font-weight: 400;
            letter-spacing: 0.2px;
            transition: opacity 0.2s ease;
        }

        .top-links a:hover,
        .top-icons a:hover,
        .category-link:hover,
        .dropdown-menu a:hover {
            opacity: 0.82;
        }

        .top-tagline {
            font-size: 14px;
            white-space: nowrap;
        }

        .middle-bar {
    background: #f7f0eb;
    padding: 18px 100px;   
    border-bottom: 1px solid #8e7d72;
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    align-items: center;
}

        .logo img {
            width: 96px;
            height: auto;
            display: block;
        }

        .search-area {
            position: relative;
            max-width: 560px;
            width: 100%;
            margin: 0 auto;
        }

        .search-form {
            width: 100%;
            position: relative;
        }

        .search-input {
            width: 100%;
            height: 44px;
            border: none;
            outline: none;
            border-radius: 999px;
            padding: 0 58px 0 18px;
            background: linear-gradient(90deg, #b03b87, #6a36b7);
            color: #fff;
            font-size: 16px;
        }

        .search-input::placeholder {
            color: rgba(255,255,255,0.9);
        }

        .search-btn {
            position: absolute;
            top: 50%;
            right: 14px;
            transform: translateY(-50%);
            border: none;
            background: transparent;
            color: #fff;
            font-size: 22px;
            cursor: pointer;
        }

        .search-suggestions {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            width: 100%;

            background: #fff;
            border-radius: 14px;
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
            overflow: hidden;
            display: none;
            z-index: 1000;
        }

        .search-suggestions.show {
            display: block;
        }

        .suggestion-item {
            display: block;
            padding: 12px 16px;
            font-size: 14px;
            color: #4a2f1d;
            border-bottom: 1px solid #f0e8e3;
            transition: background 0.2s ease;
        }

        .suggestion-item:last-child {
            border-bottom: none;
        }

        .suggestion-item:hover,
        .suggestion-item.active {
            background: #f7f0eb;
        }

        .top-icons {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 26px;
        }

        .top-icons a {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            font-size: 14px;
            color: #4a2f1d;
        }

        .top-icons i {
            font-size: 25px;
            color: #7c3bb1;
        }

 header {
    position: relative;
    z-index: 500;
}

.category-bar {
    background: #f7f0eb;
    border-bottom: 1px solid #8e7d72;
    position: relative;
    z-index: 500;
}

.category-list {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.category-item {
    position: static;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    font-size: 16px;
    color: #4a2f1d;
    transition: background 0.2s ease;
}

.category-link i {
    font-size: 12px;
}

.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: min(1200px, calc(100vw - 40px));
    background: #fff;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
    padding: 28px 32px;
    z-index: 999;
}

.category-item:hover .mega-menu,
.category-item:focus-within .mega-menu {
    display: block;
}

.mega-menu-content {
    display: block;
    gap: 40px;
    align-items: start;
}

.mega-menu-content:has(.mega-menu-image) {
    grid-template-columns: 1.5fr 420px;
}

.mega-menu-content:not(:has(.mega-menu-image)) {
    grid-template-columns: 1fr;
}

.mega-menu-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
}

.mega-menu-column h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #4a2f1d;
}

.mega-menu-column h4::after {
    content: "";
    display: block;
    width: 55px;
    height: 2px;
    background: #6C399A;
    margin-top: 8px;
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-column li {
    margin-bottom: 12px;
}

.mega-menu-column a {
    color: #4a2f1d;
    font-size: 15px;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mega-menu-column a:hover {
    color: #C34776;
}

.mega-menu-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.hero-section,
.category-section,
.recipe-section,
.about-section,
.site-footer {
    position: relative;
    z-index: 1;
}

@media (max-width: 1100px) {
    .mega-menu-content {
        grid-template-columns: 1fr;
    }

    .mega-menu-image img {
        height: 260px;
    }
}

@media (max-width: 800px) {
    .mega-menu-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .mega-menu-columns {
        grid-template-columns: 1fr;
    }

    .mega-menu {
        width: calc(100vw - 20px);
        padding: 20px;
    }
}



.recipe-page {
    max-width: 900px;
    margin: 80px auto;
    text-align: center;
}

.recipe-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--brown);
    margin-bottom: 50px;
}

/* grid */
.recipe-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
}

/* card */
.recipe-card {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 40px;
    overflow: hidden;
    cursor: pointer;

    animation: popIn 0.6s ease forwards;
}

/* stagger animation */
.recipe-card:nth-child(1){ animation-delay: 0.1s;}
.recipe-card:nth-child(2){ animation-delay: 0.25s;}
.recipe-card:nth-child(3){ animation-delay: 0.4s;}

.recipe-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    /* 默认暗 */
    filter: brightness(45%);
    transition: 0.4s;
}

/* hover变亮 */
.recipe-card:hover img {
    filter: brightness(100%);
    transform: scale(1.08);
}

/* 中间标签 */
.recipe-card span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    padding: 14px 28px;
    border-radius: 999px;
    background: rgba(255,255,255,0.7);

    font-weight: 800;
    color: var(--brown);
    letter-spacing: 1px;
}

/* pop animation */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(30px);
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}



.book-page {
    max-width: 1100px;
    margin: 70px auto 100px;
    padding: 0 24px;
    text-align: center;
}

.recipe-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--brown);
    margin-bottom: 40px;
}

.book-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.book {
    display: flex;
    width: 760px;
    height: 520px;
    position: relative;
    perspective: 1800px;
    background: #f7f0eb;
    border-radius: 22px;
    box-shadow: 0 20px 45px rgba(60, 40, 26, 0.18);
    overflow: visible;
}

.page {
    width: 50%;
    height: 100%;
    background: var(--cream);
    padding: 14px;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.page.left {
    border-radius: 20px 0 0 20px;
    border-right: 1px solid rgba(60, 40, 26, 0.18);
    transform-origin: right center;
}

.page.right {
    border-radius: 0 20px 20px 0;
    border-left: 1px solid rgba(60, 40, 26, 0.18);
    transform-origin: left center;
}

.page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

.page.right.turn-right {
    animation: realFlipRight 0.8s ease-in-out;
    z-index: 5;
}

.page.left.turn-left {
    animation: realFlipLeft 0.8s ease-in-out;
    z-index: 5;
}

@keyframes realFlipRight {
    0% {
        transform: rotateY(0deg);
    }
    45% {
        transform: rotateY(-110deg);
        box-shadow: -25px 12px 35px rgba(0,0,0,0.28);
    }
    100% {
        transform: rotateY(0deg);
    }
}

@keyframes realFlipLeft {
    0% {
        transform: rotateY(0deg);
    }
    45% {
        transform: rotateY(110deg);
        box-shadow: 25px 12px 35px rgba(0,0,0,0.28);
    }
    100% {
        transform: rotateY(0deg);
    }
}

.flip-btn {
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transition: 0.25s ease;
}

.flip-btn:hover {
    transform: scale(1.08);
}

.page-indicator {
    margin-top: 22px;
    font-size: 18px;
    font-weight: 700;
    color: var(--brown);
}

@media (max-width: 850px) {
    .book {
        width: 90vw;
        height: 440px;
    }

    .flip-btn {
        width: 46px;
        height: 46px;
        font-size: 34px;
    }
}


.poster-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(60, 40, 26, 0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.poster-lightbox.show {
    display: flex;
}

.poster-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    padding: 12px;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.35);
    cursor: zoom-out;
}


.save-recipe-btn {
    margin-top: 18px;
    border: none;
    border-radius: 999px;
    padding: 12px 34px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

.save-recipe-btn:hover {
    transform: translateY(-2px);
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.lightbox-save-form {
    margin: 0;
}

.save-recipe-btn {
    border: none;
    border-radius: 999px;
    padding: 12px 34px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: white;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

.save-recipe-btn:hover {
    transform: translateY(-2px);
}






.site-footer {
    margin-top: 100px;
    color: #fff;

    background: linear-gradient(
        270deg,
        #c34776,
        #6c399a,
        #c34776
    );

    background-size: 400% 400%;  
    animation: gradientMove 6s ease infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.footer-top {
    max-width: 1100px;
    margin: 0 auto;
    padding: 45px 50px 35px;
    display: grid;
    grid-template-columns: 1fr 1fr 1.1fr;
    gap: 40px;
}

.footer-column h3,
.footer-subtitle {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 14px;
    position: relative;
    display: inline-block;
}

.footer-column h3::after,
.footer-subtitle::after {
    content: "";
    display: block;
    width: 160px;
    height: 2px;
    background: #D9D462;
    margin-top: 6px;
}

.footer-column h3::after {
    content: "";
    display: block;
    width: 160px;
    height: 2px;
    background: #D9D462;
    margin-top: 6px;

    transform: scaleX(0);         
    transform-origin: left;
    transition: transform 0.4s ease;
}

.footer-column h3:hover::after {
    transform: scaleX(1); 
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0 0 26px 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    transition: opacity 0.3s ease;
}

.footer-column a:hover {
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 14px;
    margin-top: 24px;
}

.footer-social a {
    font-size: 24px;
    color: #fff;
}

.footer-map {
    width: 100%;
    max-width: 250px;
    height: auto;
    display: block;
    margin-bottom: 14px;
}

.footer-address,
.footer-phone {
    font-size: 14px;
    line-height: 1.7;
    color: #f7f0eb;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    text-align: center;
    padding: 18px 20px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.08);
}


@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-map {
        max-width: 100%;
    }
}