.title {
    background-image: linear-gradient(to top,
            var(--black-50),
            var(--black-50)),

        url('../images/header-stores.jpg');
}

/* 修复navigation bar问题 */
header {
    z-index: 1000;
}

/* ---  HEADQUARTERS  --- */
/* 题目 */
.store-intro {
    text-align: center;
    max-width: 900px;
    /* 为了限制那个sub的长度才选择放max-width */
    margin: auto;
    margin-bottom: 50px;
}


/* 小标题颜色 */
.store-intro .small {
    color: var(--tertiary);
    font-weight: 700;
    /* 让绿色category name变bold */
}

/* 因为都是粘着所以放margin让他有距离 */
.store-intro h3 {
    margin-top: 10px;
    margin-bottom: 20px;
}

/* 总部地图 */
.map-container-large img {
    width: 100%;
    transition: transform 0.3s ease;
    /* 添加跟promotion一样的transition */
}

.map-container-large img:hover {
    transform: scale(1.03);
    /* 改为跟promotion一样的scale(1.03) */
}

.headquarters h4 {
    margin-bottom: 50px;
}

/* 总部信息框 */
.hq-details {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    /* 让所有msg高度一样占满那个box */
    margin-top: 10px;
    margin-bottom: 50px;
}

.detail-column {
    flex: 1;
    text-align: center;
    padding: 0 20px;
    border-right: 2px solid var(--grey-dark);
    margin-bottom: 45px;
}


.detail-column:last-child {
    border-right: none;
}


/* Store Row de box */
.store-row {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    margin-bottom: 80px;
}

/* 地图部分 */
.store-map {
    flex: 1;
}

.store-map img {
    width: 100%;
    transition: transform 0.3s ease;
    /* 添加跟promotion一样的transition */
}

.store-map img:hover {
    transform: scale(1.03);
    /* 改为跟promotion一样的scale(1.03) */
}

/* words */
.store-info {
    flex: 1;
}

/*give him align  */
.store-row h4 {
    margin-bottom: 40px;

}

/* info de box */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* words */
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* icon */
.info-item img {
    width: 25px;
    /* 用png应为是icon */
}

/* yishang done liao  */

/* --- PROMOTION  --- */
.promotion-section {
    margin-top: 70px;
    text-align: center;
}

.promotion-section .small {
    color: var(--sec-default);
    font-weight: 700;
    /* 让绿色category name变bold */
}

.promotion-section h3 {
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: center;

}

.tajuk-promotion {
    margin-bottom: 70px;
}

.promotion-section p:not(.price, .currency) {
    margin: auto;
    max-width: 600px;
    color: var(--grey-dark);
}

/* biaoti wan cheng */
.promo-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    margin-top: 50px;
    margin-bottom: 100px;
    flex-wrap: wrap;
    /* 允许换行，避免固定宽度造成navigation bar */
    padding: 0 120px;
    /* 再增加左右padding */
}




.promo-card {
    background-color: var(--dark);
    width: 340px;
    height: 300px;
    border-radius: 20px;
    position: relative;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease;
}

.promo-card:hover {
    transform: scale(1.03);
    /* 统一性那个jiaxuan的food 的animation */
}

.price-tag {
    position: absolute;
    top: -40px;
    left: 40px;
    background-color: var(--sec-default);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--white);
    z-index: 10;
}

.price-tag .price {
    color: var(--white);
    line-height: 40px;
}

.price-tag .currency {
    color: var(--white);

}

.promo-details {
    width: 100%;

}

.promo-details h4 {
    color: var(--black);
    text-align: left;
    position: relative;
    z-index: 5;
    margin-top: -90px;
}

.promo-details img {
    position: absolute;
    z-index: 2;
    object-fit: contain;
}


/* Milo */
.promo-card:nth-of-type(1) .promo-details img {
    width: 250px;
    bottom: -30px;
    right: -105px;
    z-index: 3;
}

/* Curry Puff */
.promo-card:nth-of-type(2) .promo-details img {
    width: 380px;
    bottom: -45px;
    right: -75px;
}

/* Kopi O */
.promo-card:nth-of-type(3) .promo-details img {
    width: 300px;
    bottom: -40px;
    right: -30px;
    z-index: 1;
}

/* 因为图片全部大小不一样然后调位置会不一样所以我就用 nth-of-type 单独调 /
/ 其实意思就是每张卡 第一张等于1 要调1就可以写那个class名字 然后他的value要调整的
然后1，2，3顺序的意思 */

/* yihsnagwancheng */

/* ---  DELIVERY  --- */
/* whole delivery box gap */
.delivery-section {
    margin-top: 70px;
    margin-bottom: 70px;
}


.subtitle-text {
    max-width: 700px;
    margin: 20px auto 60px auto;
    color: var(--grey-dark)
}

.delivery-content-box {
    margin-bottom: 60px;
}

/* card de box */
.delivery-grid {
    display: flex;
    justify-content: center;
    gap: 40px;

}

.delivery-card {
    background-color: var(--tertiary);
    width: 344px;
    height: 298px;
    border-radius: 20px;
    padding: 40px 30px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.3s;
    /* 添加跟promotion一样的transition */
}

.delivery-card:hover {
    transform: scale(1.03);
    /* 改为跟promotion一样的scale(1.03) */
}

.delivery-card h6 {
    color: var(--white);
    margin-bottom: 20px;
}

.delivery-card p {
    color: var(--white) !important;
    margin-bottom: 30px;
    text-align: left;
}

/* Order now */
.tb.white {
    align-self: center;
}

/* ---  KOPIDIAM WAY --- */
.kopidiam-way-section {
    position: relative;
    margin-top: 150px;
    margin-bottom: 120px;
    padding: 0 20px;
}

.way-content-box {
    background-color: var(--secondary);
    border-radius: 30px;
    height: 573px;
    width: 100%;
    max-width: 1100px;
    margin: auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 60px;
}


.titlekopidiam {
    text-align: center;
    margin-top: 80px;
    z-index: 10;
    position: relative;
}

.titlekopidiam h3,
.way-content-box h3 {
    color: var(--white);
    text-align: center;
    z-index: 10;
    position: relative;
}

.floating-images {
    display: none;
}


.text-with-lines {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: auto;
    width: 100%;
    justify-content: center;
}

.text-with-lines p {
    color: var(--white);
    text-align: center;
    width: 746px;
}

.line {
    height: 1px;
    background-color: var(--white);
    flex: 1;
    opacity: 0.6;
}

.wrapper {
    position: relative;
    overflow-x: clip;
}

.wrapper.dark {
    background: var(--dark);
    border-radius: 30px;
}

/* 针对第一个section的wrapper设置special的border radius */
.wrapper.dark:has(.store-section) {
    border-radius: 0 0 30px 30px;
    /* 上面直角，下面圆角 */
}

.third-up {

    bottom: 45%;
    right: -10%;
    width: 40%;
    transform: scaleX(-1) rotate(10deg);

}

.last-up {
    bottom: 70%;
    left: -18%;
    width: 50%;
    transform: scaleX(1) rotate(-5deg);
}

.last-down {
    bottom: -60%;
    right: -20%;
    width: 30%;
    transform: scaleX(-1) rotate(10deg);
}



/* 平板版本 */
@media screen and (max-width: 1024px) {
    div.wrapper {
        gap: 60px;
    }



    .store-section {
        margin-top: -60px;
    }

    .store-intro {
        margin-bottom: 35px;
        padding-top: 35px;
    }

    .headquarters h4 {
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .hq-details {
        flex-direction: column;
        margin-top: 15px;
        margin-bottom: 40px;
    }

    .detail-column {
        width: 100%;
        text-align: center;
        padding: 20px 15px;
        border-right: none;
        border-bottom: 1px solid var(--grey-light);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin: auto;
    }

    .detail-column:last-child {
        border-bottom: none;
    }

    .store-row {
        flex-direction: column;
        gap: 10px;
        text-align: left;
        margin-bottom: 40px;
    }

    .store-row h4 {
        margin-bottom: 15px;
    }

    .store-row.reverse {
        flex-direction: column;
    }

    .store-row.reverse .store-info {
        order: 2;
    }

    .store-row.reverse .store-map {
        order: 1;
    }

    .store-map,
    .store-info {
        flex: none;
        width: 100%;
    }

    .way-content-box {
        width: 90%;
        padding: 60px 40px;
    }

    .promotion-section {
        padding: 0 80px;
        /* 进一步增加左右padding避免navigation bar */
        margin-bottom: 100px;
        margin-top: 50px;
    }

    .promotion-section p {
        padding: 0 15px;
    }

    .promo-grid {
        display: flex;
        align-items: center;
        gap: 25px;
        margin: 40px auto 60px auto;
        padding: 0 50px;
        /* 进一步增加promo-grid的padding */
    }


    .promo-card:nth-of-type(1) .promo-details img {
        width: 300px;
    }

    .delivery-section {
        margin-top: 35px;
        margin-bottom: 50px;
    }

    .delivery-grid {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .delivery-card {
        width: 80%;
        height: 298px;
        border-radius: 20px;
        padding: 40px 30px;
        display: flex;
        flex-direction: column;
        text-align: left;
    }

    .delivery-card h6 {
        margin-bottom: 15px;
        text-align: center;
    }

    .delivery-card p {
        margin-bottom: 30px;
        text-align: center;
    }

    .order-link {
        text-align: center;
        display: block;
    }

    .kopidiam-way-section {
        margin-top: 0;
        margin-bottom: 80px;
    }


    .deco {
        display: none;
    }
}

/* 手机版本 */
@media screen and (max-width: 768px) {


    .store-intro {
        margin-bottom: 35px;
        text-align: left;
        padding: 0 15px;
        margin-top: 70px;
    }

    .store-intro h3 {
        font-size: 22px;
        text-align: left;
    }

    .store-intro p {
        text-align: left;
    }

    .headquarters {
        text-align: left;
        padding: 0 15px;
        margin-bottom: 40px;
    }

    .headquarters h4 {
        margin-top: 10px;
        margin-bottom: 10px;
        font-size: 20px;
        text-align: left;
    }

    .hq-details {
        text-align: left;
        margin-bottom: 40px;
    }

    .detail-column {
        text-align: left;
        padding: 15px 0;
    }

    .detail-column p {
        font-size: 13px;
        line-height: 1.4;
    }

    /* 第一section统一布局：照片在上，文字在下，左对齐 */
    .store-row {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 40px;
        text-align: left;
        padding: 0 15px;
    }

    /* 确保第二个store-row (reverse) 也是照片在前，文字在后 */
    .store-row.reverse {
        flex-direction: column;
    }

    .store-row.reverse .store-info {
        order: 2;
    }

    .store-row.reverse .store-map {
        order: 1;
    }

    .store-row h4 {
        font-size: 22px;
        margin-bottom: 20px;
        text-align: left;
    }

    .store-map,
    .store-info {
        width: 100%;
    }

    .info-list {
        gap: 15px;
        margin-bottom: 30px;

    }

    .info-item {
        text-align: left;
    }

    .info-item p {
        text-align: left;
        font-size: 13px;
        line-height: 1.4;
    }


    .promotion-section {
        margin-top: 40px;
        margin-bottom: 60px;
        padding: 0 20px;

    }


    .promotion-section h3 {
        font-size: 20px;
        margin-top: 20px;
    }

    .promotion-section p {
        padding: 0 5px;
        line-height: 1.3;
        max-width: 320px;
        margin: auto;
    }

    .way-content-box {
        width: 95%;
        height: auto;
        padding: 40px 20px;
        border-radius: 30px;
        /* 确保跟desktop一样的border radius */
    }

    .titlekopidiam {
        margin: 40px 0 0 0;
    }

    .titlekopidiam h3 {
        font-size: 22px;
    }

    .text-with-lines {
        flex-direction: column;
        gap: 20px;
    }

    .text-with-lines p {
        width: 100%;
        font-size: 14px;
        padding: 0 10px;
        line-height: 1.6;
    }

    .line {
        width: 100px;
        height: 1px;
    }

    .promo-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        margin-top: 20px;
        margin-bottom: 35px;
        padding: 0 15px;
    }

    .promo-card {
        width: 90%;
        min-width: auto;
    }

    .price-tag {
        gap: 0;
        align-items: center;
    }


    .price-tag .price {
        font-size: clamp(20px, 2.5vw, 44px);
        line-height: 0.7;
        /* 进一步减少gap */

    }

    .price-tag .currency {
        font-size: clamp(14px, 2vw, 18px);
        /* 恢复并加大货币符号字体 */
        line-height: 0.7;
        /* 进一步减少gap */
        margin-top: -4px;
        /* 适中的负margin */
    }

    /* 这里也是针对一个group里的孩子一个一个调(xiangtongmingzi/meimingzi) */
    .promo-card:nth-of-type(1) .promo-details img {
        width: 250px;
        right: -20px;
    }

    .promo-card:nth-of-type(2) .promo-details img {
        width: 300px;
        right: -20px;
    }

    .promo-card:nth-of-type(3) .promo-details img {
        width: 270px;
        right: 0px;
    }

    .promo-card:nth-of-type(2) .promo-details img {
        z-index: 1;
    }

    .delivery-card {
        width: 90%;
        padding: 30px 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .delivery-card h6 {
        text-align: center;
        margin-bottom: 15px;
        /* 减少间距让title和p靠近一点 */
    }

    .delivery-card p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 25px;
        /* 减少文字下方间距 */
        text-align: center;
    }

    .kopidiam-way-section {
        margin-top: 20px;
        margin-bottom: 50px;
    }

    .floating-images {
        display: none;
    }
}