<template>
    <div class="productcenter"
        v-if="router.currentRoute.value.params.name != '3' && router.currentRoute.value.params.name != '6'">
        <div class="door-bgc position-relative">
            <img :src="banner.src" :alt="banner.name">
            <span class="position-absolute doortitle color-fff font-bold"
                :class="mobileShow ? 'font-size-16' : 'font-size-50'" v-if="banner.title && banner.title != ''">{{
                    banner.title }}</span>
        </div>
        <div class="box">
            <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" v-if="productList.length != 0">
                <el-tab-pane :label="item.title" :name="item.title" v-for="item, index in productList" :key="index">
                    <div class="tabs-pic">
                        <div class="top-pic">
                            <img :src="doorproduct.top.detail" :alt="doorproduct.name">
                        </div>
                        <div class="footer-pic">
                            <div class="footer-left">
                                <img :src="doorproduct.footer.detail" :alt="doorproduct.name">
                            </div>
                            <div class="footer-right">
                                <img :src="doorproduct.footer1.detail" :alt="doorproduct.name">
                                <img :src="doorproduct.footer2.detail" :alt="doorproduct.name">
                            </div>
                        </div>
                    </div>
                </el-tab-pane>
            </el-tabs>
            <div class="allpic" v-if="router.currentRoute.value.params.name != '1'">
                <div v-for="item2, index2 in product" :key="index2" class="pic" v-if="product.length != 0">
                    <el-divider content-position="center" border-style="dashed" v-if="item2.name && item2.name != ''">{{
                        item2.name }}</el-divider>
                    <div class="all-pic">
                        <div class="pic1" v-for="item3, index3 in item2.children" :key="index3"
                            v-if="item2.children && item2.children.length > 0">
                            <img :src="item3.detail" :alt="item2.name" loading="lazy">
                        </div>
                        <div class="allpic1" v-else>
                            <el-empty description="No further content available at the moment" />
                        </div>
                    </div>
                </div>
                <div class="allpic1" v-else>
                    <el-empty description="No further content available at the moment" />
                </div>
            </div>
        </div>
        <div class="color-333 btn position-relative" :class="mobileShow ? 'font-size-20' : 'font-size-26'" @click="goPage">
            Back</div>
    </div>
    <div class="productcenter" v-else>
        <div class="railling-bgc">
            <div class="railling-banner">
                <div class="banner-left">
                    <img :src="productmessage.banner1.detail" :alt="productmessage.banner1.name">
                    <span class="banner-title">{{ productmessage.banner1.title }}</span>
                </div>
                <div class="banner-right">
                    <div class="icon-img">
                        <img :src="productmessage.banner2.detail" :alt="productmessage.banner2.name">
                        <div class="banner-icon" v-if="productmessage.tips && productmessage.tips.length != 0">
                            <span class="icon" v-for="item, index in productmessage.tips" :key="index">
                                <img :src="item.detail" :alt="item.name">
                                <span>{{ item.title }}</span>
                            </span>
                        </div>
                    </div>
                </div>
                <div class="banner">
                    <img :src="productmessage.banner3.detail" :alt="productmessage.banner3.name">
                </div>
            </div>
            <div class="pic">
                <el-tabs v-model="activeName2" class="demo-tabs" @tab-click="handleClick1"
                    v-if="productmessage.children && productmessage.children.length != 0">
                    <el-tab-pane :label="item.name" :name="item.name" v-for="item, index in productmessage.children"
                        :key="index">
                        <div class="children-pic" v-if="router.currentRoute.value.params.name == '3'">
                            <div class="children-header">
                                <div class="header-left">
                                    <h1>{{ item.message.title }}</h1>
                                    <h2><strong>{{ item.message.mintitle }}</strong></h2>
                                    <span class="left-ietm" v-if="item.message.Application">{{ item.message.Application
                                    }}</span>
                                    <span class="left-ietm" v-if="item.message.patiosMaterials">{{
                                        item.message.patiosMaterials }}</span>
                                    <span class="left-ietm" v-if="item.message.Styles">{{ item.message.Styles }}</span>
                                </div>
                                <div class="header-right">
                                    <img :src="item.banner.detail" :alt="item.banner.name">
                                    <div class="mask"></div>
                                </div>
                            </div>
                            <div class="children-allpic">
                                <div class="children-item" v-for="item2, index2 in item.others" :key="index2"
                                    v-if="item.others && item.others.length != 0">
                                    <img :src="item2.detail" :alt="item2.name">
                                    <span class="img-title" v-if="item2.title">{{ item2.title }}</span>
                                </div>
                            </div>
                        </div>
                        <div class="children-pic1" v-else-if="router.currentRoute.value.params.name == '6'">
                            <div class="allpic1" v-if="activeName2 == 'LED Mirror'">
                                <div class="pic1-item" v-for="item2, index2 in item.others"
                                    v-if="item.others && item.others.length != 0" :key="index2">
                                    <div class="pic1-img">
                                        <img :src="item2.detail" :alt="item2.name">
                                    </div>
                                    <div class="pic1-title">
                                        <img :src="item.banner.detail" :alt="item.banner.name">
                                        <span>{{ item2.title }}</span>
                                    </div>
                                </div>
                                <div class="pic1-item" v-if="item.others1">
                                    <div class="pic1-title">
                                        <img :src="item.banner.detail" :alt="item.banner.name">
                                        <span>{{ item.others1.title }}</span>
                                    </div>
                                    <div class="pic1-img">
                                        <img :src="item.others1.detail" :alt="item.others1.name">
                                    </div>
                                </div>
                                <div class="pic1-item1" v-if="item.others2">
                                    <div class="pic1-title">
                                        <img :src="item.banner.detail" :alt="item.banner.name">
                                        <span>{{ item.others2.title }}</span>
                                    </div>
                                    <div class="pic1-img">
                                        <img :src="item.others2.detail" :alt="item.others2.name">
                                    </div>
                                </div>
                            </div>
                            <div v-else-if="activeName2 == 'Wooden Frame Mirror'">
                                <div class="wooden">
                                    <div class="wooden-header" v-if="item.others && item.others.length != 0">
                                        <div class="wooden-item" v-for="item2, index2 in item.others" :key="index2">
                                            <img :src="item2.detail" :alt="item2.name">
                                            <span>{{ item2.title }}</span>
                                        </div>
                                    </div>
                                    <div class="wooden-bootom">
                                        <div class="wooden-left" v-if="item.banner">
                                            <img :src="item.banner.detail" :alt="item.banner.name">
                                            <span>{{ item.banner.title }}</span>
                                        </div>
                                        <div class="wooden-right" v-if="item.banner2">
                                            <img :src="item.banner2.detail" :alt="item.banner2.name">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div v-else-if="activeName2 == 'Faucets'">
                                <div class="faucets">
                                    <div class="faucets-header">
                                        <div class="header-left" v-if="item.banner1">
                                            <div class="left1">
                                                <img :src="item.banner1.detail" :alt="item.banner1.name">
                                            </div>
                                            <div class="left2">
                                                <img :src="item.banner2.detail" :alt="item.banner2.name">
                                            </div>
                                        </div>
                                        <div class="header-right" v-if="item.others && item.others.length != 0">
                                            <div class="right-item" v-for="item2, index2 in item.others" :key="index2">
                                                <img :src="item2.detail" :alt="item2.name">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="faucets-bottom">
                                        <h1 v-if="item.others2"><strong>{{ item.others2.title }}</strong></h1>
                                        <span v-if="item.others2">{{ item.others2.mintitle }}</span>
                                        <div class="color-pic"
                                            v-if="item.others2 && item.others2.children && item.others2.children.length != 0">
                                            <img :src="item2.detail" :alt="item2.name"
                                                v-for="item2, index2 in item.others2.children" :key="index2">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div v-else-if="activeName2 == 'Basins'">
                                <div class="basins">
                                    <div class="basins-header" v-if="item.others && item.others.length != 0">
                                        <div class="header-item" v-for="item2, index2 in item.others" :key="index2">
                                            <img :src="item2.detail" :alt="item2.name">
                                        </div>
                                    </div>
                                    <div class="basins-bottom">
                                        <h1 v-if="item.others2"><strong>{{ item.others2.title }}</strong></h1>
                                        <span v-if="item.others2"><strong>{{ item.others2.mintitle }}</strong></span>
                                        <div class="styles">
                                            <div class="basins-styles"
                                                v-if="item.others2 && item.others2.children && item.others2.children.length != 0">
                                                <div class="styles-item" v-for="item2, index2 in item.others2.children"
                                                    :key="index2">
                                                    <img :src="item2.detail" :alt="item2.name">
                                                </div>
                                            </div>
                                            <div class="basins-quality">
                                                <h2 v-if="item.icons"><strong>{{ item.icons.title }}</strong></h2>
                                                <div class="icons"
                                                    v-if="item.icons && item.icons.children && item.icons.children.length != 0">
                                                    <img :src="item2.detail" :alt="item2.name"
                                                        v-for="item2, index2 in item.icons.children" :key="index2">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div v-else-if="activeName2 == 'Toilets'">
                                <div class="toilet">
                                    <div class="toilet-banner" v-if="item.banner">
                                        <img :src="item.banner.detail" :alt="item.banner.name">
                                    </div>
                                    <div class="other-toilet" v-if="item.others && item.others.length != 0">
                                        <img :src="item2.detail" :alt="item2.name" v-for="item2, index2 in item.others"
                                            :key="index2">
                                    </div>
                                    <div class="toilet-style">
                                        <h1 v-if="item.styles"><strong>{{ item.styles.title }}</strong></h1>
                                        <span v-if="item.styles"><strong>{{ item.styles.mintitle }}</strong></span>
                                        <div class="styles"
                                            v-if="item.styles && item.styles.children && item.styles.children.length != 0">
                                            <div class="styles-item" v-for="item2, index2 in item.styles.children"
                                                :key="index2">
                                                <img :src="item2.detail" :alt="item2.name">
                                                <span><strong>{{ item2.title }}</strong></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div v-else-if="activeName2 == 'Tubs'">
                                <div class="tubs">
                                    <div class="tubs-header" v-if="item.others && item.others.length != 0">
                                        <div class="header-item" v-for="item2, index2 in item.others" :key="index2">
                                            <div class="item-left">
                                                <img :src="item2.detail" :alt="item2.name">
                                            </div>
                                            <div class="item-right">
                                                <span>{{ item2.title }}</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="tubs-bottom">
                                        <div class="bottom-left" v-if="item.others2">
                                            <h1><strong>{{ item.others2.title }}</strong></h1>
                                            <div class="one"></div>
                                            <h2><strong>{{ item.others2.mintitle }}</strong></h2>
                                            <div class="bottom-tubs"
                                                v-if="item.others2 && item.others2.children && item.others2.children.length != 0">
                                                <div class="bottom-item" v-for="item2, index2 in item.others2.children"
                                                    :key="index2">
                                                    <img :src="item2.detail" :alt="item2.name">
                                                    <span>{{ item2.title }}</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="bottom-right">
                                            <h2 v-if="item.icons"><strong>{{ item.icons.title }}</strong></h2>
                                            <div class="icons"
                                                v-if="item.icons && item.icons.children && item.icons.children.length != 0">
                                                <img :src="item2.detail" :alt="item2.name"
                                                    v-for="item2, index2 in item.icons.children" :key="index2">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div v-else-if="activeName2 == 'Shower Rooms'">
                                <div class="shower">
                                    
                                </div>
                            </div>
                        </div>
                        <div class="btn position-relative font-size-24" @click="goPage">Back</div>
                    </el-tab-pane>
                </el-tabs>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import router from '../router';
import { ref, watch, onMounted } from 'vue'
import { TabsPaneContext, formContextKey } from 'element-plus/lib';
import useHomeStore from '../store/modules/homepage'

let Home = useHomeStore()

let productList = Array<any>([])
let product = Array<any>([])
let doorproduct = ref<any>({})
let productmessage = ref<any>({})  // 产品内页大图
let banner = ref({
    src: '',
    title: '',
    name: ''
})
let activeName = ref<any>('')
let activeName2 = ref<any>('')
let mobileShow = ref<any>(false)

const handleClick = (tab: TabsPaneContext, event: Event) => {
    activeName.value = tab.props.name
    Home.$state.Doors.map((li: any) => {
        if (li.name == activeName.value) {
            doorproduct.value = li
        }
    })
}
const handleClick1 = (tab: TabsPaneContext, event: Event) => {
    activeName2.value = tab.props.name
}
const goPage = () => {
    localStorage.setItem('scrollPosition', 'productCenter')
    router.push({
        path: '/'
    })
}

watch(() => router.currentRoute.value.params.name, (newValue: any) => {
    Home.$state.Products.map((li: any) => {
        if (newValue == li.position) {
            productmessage.value = li
            if (li.children && li.children.length != 0) {
                activeName2.value = li.children[0].name
            }
        }
    })
    if (newValue == '1') {
        productList = [{ title: 'Wrought Iron Doors' }, { title: 'Steel Security Doors' },
        { title: 'Pivot Entrance Doors' }, { title: 'Wooden Internal Doors' }, { title: 'Fire Doors' },
        { title: 'Sliding Doors' }, { title: 'Hanging Sliding Doors' }, { title: 'Fold Sliding Doors' }]
        banner.value = {
            src: new URL("../assets/img/Door/01.jpg", import.meta.url).href,
            title: 'Safety, Health, and Environmental Protection',
            name: 'Door'
        }
        activeName.value = productList[0].title
        Home.$state.Doors.map((li: any) => {
            if (li.name == activeName.value) {
                doorproduct.value = li
            }
        })
    } else if (newValue == '2') {
        productList = []
        product = []
    } else if (newValue == '3') {
        productList = []
        product = []
    } else if (newValue == '4') {
        productList = []
        product = []
    } else if (newValue == '5') {
        productList = []
        banner.value = {
            src: new URL("../assets/img/Kitchen/01.jpg", import.meta.url).href,
            title: '',
            name: 'Kitchen'
        }
        product = Home.$state.Cabinet
    } else if (newValue == '0') {
        productList = []
        banner.value = {
            src: new URL('../assets/img/FFE/1.jpg', import.meta.url).href,
            title: '',
            name: 'Hotel FFE'
        }
        product = [
            {
                children: [
                    { detail: new URL("../assets/img/FFE/2.jpg", import.meta.url).href, name: 'Hotel FFE' },
                    { detail: new URL("../assets/img/FFE/3.jpg", import.meta.url).href, name: 'Hotel FFE' },
                ]
            }
        ]
    } else if (newValue == '6') {
        productList = []
        product = []
    }
}, { immediate: true, deep: true })

onMounted(() => {
    if (document.body.offsetWidth < 960) {
        mobileShow.value = true
    } else {
        mobileShow.value = false
    }
    window.addEventListener('resize', function () {
        if (document.body.offsetWidth < 960) {
            mobileShow.value = true
        } else {
            mobileShow.value = false
        }
    })
})


</script>

<style scoped lang="less">
// 产品的大图展示
.tubs {
    box-sizing: border-box;
    width: 100%;
    padding: 1rem;

    .tubs-header {
        width: 100%;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;

        .header-item {
            width: 48%;
            display: flex;
            margin-bottom: 2rem;

            .item-left {
                width: 50%;

                img {
                    width: 100%;
                    height: 100%;
                }
            }

            .item-right {
                width: 50%;
                background: url('../assets/img/sanitary/mirror/bgc.jpg') no-repeat;
                background-size: cover;
                position: relative;

                span {
                    box-sizing: border-box;
                    width: 100%;
                    text-align: center;
                    color: #fff;
                    padding: 0 1rem;
                    position: absolute;
                    left: 50%;
                    top: 50%;
                    font-weight: 700;
                    transform: translate(-50%, -50%);
                }
            }
        }

        .header-item:nth-child(3),
        .header-item:nth-child(4) {
            .item-left {
                position: relative;
                left: 50%;
                // transform: translateX(-50%);
            }

            .item-right {
                position: relative;
                left: -50%;
            }
        }
    }

    .tubs-bottom {
        margin-top: 2rem;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        justify-content: space-between;

        .bottom-left {
            width: 74%;
            text-align: center;
            background-color: rgba(0, 0, 0, 0.05);
            border-radius: 10px;

            .one {
                position: relative;
                left: 50%;
                transform: translateX(-50%);
                height: 1rem;
                background-color: rgba(0, 0, 0, 0.3);
                width: 20%;
                margin: 2rem 0;
            }

            .bottom-tubs {
                margin-top: 2rem;
                width: 100%;
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;

                .bottom-item {
                    width: 24%;
                    display: flex;
                    flex-direction: column;

                    img {
                        width: 100%;
                        height: 100%;
                    }

                    span {
                        margin: 1rem 0;
                        font-weight: bold;
                    }
                }
            }
        }

        .bottom-right {
            width: 24%;
            // height: 100%;
            background: url('../assets/img/sanitary/Basins/bgc.jpg') no-repeat;
            background-size: cover;
            border-radius: 10px;
            text-align: center;

            h2 {
                text-align: center;
                position: relative;
                top: 15%;
            }

            .icons {
                position: relative;
                top: 50%;
                transform: translateY(-50%);
                display: flex;
                justify-content: space-around;
                align-items: center;
                flex-wrap: wrap;

                img {
                    width: 40%;
                    height: 100%;
                    margin-bottom: 1rem;
                    margin-top: 1rem;
                }
            }
        }
    }
}

.toilet {
    box-sizing: border-box;
    padding: 1rem;
    width: 100%;

    .toilet-banner {
        width: 100%;

        img {
            width: 100%;
            height: 100%;
        }
    }

    .other-toilet {
        margin-top: 2rem;
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;

        img {
            width: 24%;
            height: 20vw;
            border-radius: 10px;
        }
    }

    .toilet-style {
        margin-top: 2rem;
        width: 100%;
        padding: 1rem;
        background: url('../assets/img/sanitary/mirror/bgc.jpg') no-repeat;
        background-size: cover;
        border-radius: 10px;

        h1,
        span {
            margin-left: 2%;
        }

        .styles {
            box-sizing: border-box;
            margin-top: 2rem;
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
            justify-content: space-between;

            .styles-item {
                width: 32%;
                display: flex;
                flex-direction: column;
                align-items: center;
                color: #ffffff;

                img {
                    width: 80%;
                    height: 80%;
                }
            }
        }
    }
}

.basins {
    padding: 1rem;

    .basins-header {
        padding: 0 1rem;

        .header-item {
            margin-top: 1rem;
            width: 100%;

            img {
                width: 100%;
                height: 100%;
            }
        }
    }

    .basins-bottom {
        box-sizing: border-box;
        margin-top: 1rem;
        background: url('../assets/img/sanitary/mirror/bgc.jpg') no-repeat;
        background-size: cover;
        width: 100%;
        padding: 1rem;

        h1,
        span {
            margin-left: 2%;
        }

        .styles {
            box-sizing: border-box;
            margin: 1rem;
            padding: 0 1rem;
            display: flex;
            justify-content: space-between;

            .basins-styles {
                width: 80%;
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;

                .styles-item {
                    width: 24%;
                    margin-bottom: 1%;

                    img {
                        width: 100%;
                        height: 100%;
                        border-radius: 10px;
                    }
                }
            }

            .basins-quality {
                width: 19%;
                background: url('../assets/img/sanitary/Basins/bgc.jpg') no-repeat;
                background-size: cover;
                border-radius: 10px;

                h2 {
                    text-align: center;
                    position: relative;
                    top: 15%;
                }

                .icons {
                    position: relative;
                    top: 50%;
                    transform: translateY(-50%);
                    display: flex;
                    justify-content: space-around;
                    align-items: center;
                    flex-wrap: wrap;

                    img {
                        width: 40%;
                        height: 100%;
                        margin-bottom: 1rem;
                        margin-top: 1rem;
                    }
                }
            }
        }
    }
}

.faucets {
    width: 100%;

    .faucets-header {
        box-sizing: border-box;
        width: 100%;
        height: 100%;
        padding: 1rem;
        background-color: #333333;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;

        .header-left {
            width: 24%;
            height: 100%;

            .left1,
            .left2 {
                width: 100%;
                height: 66%;

                img {
                    width: 100%;
                    height: 100%;
                    border-radius: 10px;
                }
            }

            .left2 {
                height: 33%;
                margin-top: 1rem;
            }
        }

        .header-right {
            width: 75%;
            height: 100%;
            display: flex;
            flex-wrap: wrap;

            .right-item {
                width: 32%;
                height: 33%;
                margin-right: 1rem;
                margin-bottom: 1rem;

                img {
                    width: 100%;
                    height: 100%;
                    border-radius: 10px;
                }
            }
        }
    }

    .faucets-bottom {
        box-sizing: border-box;
        background: url('../assets/img/sanitary/mirror/bgc.jpg') no-repeat;
        background-size: cover;
        margin-top: 2rem;
        width: 100%;
        padding: 1rem;

        h1,
        span {
            margin-left: 2%;
        }

        .color-pic {
            margin-top: 2rem;
            width: 100%;
            display: flex;
            justify-content: space-between;

            img {
                width: 49%;
                border-radius: 20px;
            }
        }
    }
}

.wooden {
    width: 100%;

    .wooden-header {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        margin-bottom: 2rem;
        justify-content: space-between;

        .wooden-item {
            width: 32%;
            position: relative;
            overflow: hidden;

            img {
                width: 100%;
                height: 100%;
                transition: 0.5s linear;
            }

            img:hover {
                scale: 1.2;
            }

            img:hover+span {
                background-color: #fa8106;
            }

            span {
                box-sizing: border-box;
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                background: rgba(0, 0, 0, 0.2);
                padding: 1rem;
                color: #fff;
                text-align: center;
            }
        }
    }

    .wooden-bootom {
        width: 100%;
        display: flex;
        justify-content: space-between;

        .wooden-left {
            width: 20%;
            position: relative;

            img {
                width: 100%;
                height: 80%;
            }

            span {
                position: absolute;
                top: 40%;
                left: 50%;
                width: 90%;
                transform: translate(-50%, -50%);
                color: #ffffff;
                font-weight: bold;
            }
        }

        .wooden-right {
            width: 78%;

            img {
                width: 100%;
                height: 80%;
            }
        }
    }
}

.children-pic {
    width: 100%;
    color: #333;
    font-weight: normal;

    .children-header {
        display: flex;
        justify-content: space-between;
        padding: 1rem;
        border: 1px solid #eee;

        .header-left {
            width: 50%;
            display: flex;
            flex-direction: column;

            h1 {
                background: linear-gradient(to right, rgba(204, 151, 79), rgba(238, 201, 136));
                -webkit-background-clip: text;
                -webkit-text-fill-color: transparent;
                font-weight: bold;
                margin-bottom: 3.5rem;
            }

            .left-ietm {
                margin-top: 0.5rem;
                font-size: 24px;
            }
        }

        .header-right {
            width: 50%;
            height: 22vw;
            position: relative;

            img {
                width: 100%;
                height: 100%;
            }

            .mask {
                width: 100%;
                height: 100%;
                background: linear-gradient(to right, #ffffff 0.5%, transparent);
                position: absolute;
                left: 0;
                top: 0;
                z-index: 2;
            }
        }
    }

    .children-allpic {
        margin-top: 2rem;
        display: flex;
        flex-wrap: wrap;

        .children-item {
            position: relative;
            width: 32%;
            height: 32vw;
            margin-right: 1%;
            margin-top: 2%;
            overflow: hidden;

            img {
                width: 100%;
                height: 100%;
                transition: 0.5s linear;
            }

            img:hover {
                scale: 1.2;
            }

            img:hover+.img-title {
                background-color: #fa8106;
            }

            .img-title {
                box-sizing: border-box;
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;
                background: rgba(0, 0, 0, 0.2);
                padding: 1rem;
                color: #fff;
                text-align: center;
            }
        }
    }

    .btn {
        cursor: pointer;
        left: 50%;
        transform: translateX(-50%);
        margin: 2rem 0 2rem;
        float: left;
        font-weight: bold;
        padding: 1rem 2.5rem;
        border: 1px solid #333;
    }
}

.children-pic1 {
    width: 100%;
    color: #333;
    font-weight: normal;

    .allpic1 {
        display: flex;
        flex-wrap: wrap;

        .pic1-item {
            width: 48%;
            height: 25vw;
            margin-right: 1%;
            margin-bottom: 2%;
            display: flex;
            background-color: pink;

            .pic1-img,
            .pic1-title {
                width: 50%;

                img {
                    width: 100%;
                    height: 100%;
                }
            }

            .pic1-title {
                position: relative;

                span {
                    position: absolute;
                    left: 50%;
                    top: 50%;
                    width: 100%;
                    transform: translate(-50%, -50%);
                    color: #fff;
                    font-weight: bold;
                    line-height: 4rem;
                }
            }
        }

        .pic1-item1 {
            width: 48%;
            height: 25vw;
            margin-right: 1%;
            margin-bottom: 2%;
            display: flex;
            flex-direction: column;

            .pic1-title {
                width: 100%;
                height: 25%;
                position: relative;

                img {
                    width: 100%;
                    height: 100%;
                }

                span {
                    position: absolute;
                    width: 100%;
                    left: 50%;
                    top: 50%;
                    transform: translate(-50%, -50%);
                    color: #fff;
                    font-weight: bold;
                }
            }

            .pic1-img {
                width: 100%;
                height: 75%;

                img {
                    width: 100%;
                    height: 100%;
                }
            }
        }
    }
}

.productcenter {
    .railling-bgc {
        box-sizing: border-box;
        width: 100%;
        margin-bottom: 2rem;

        .railling-banner {
            width: 100%;
            height: 90vh;
            position: relative;
            display: flex;
            justify-content: space-between;

            .banner-left {
                width: 80%;
                height: 100%;
                position: relative;

                img {
                    width: 100%;
                    height: 100%;
                }

                .banner-title {
                    box-sizing: border-box;
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 100%;
                    font-size: 45px;
                    text-align: center;
                    padding: 1rem;
                    color: #ffffff;
                    background: rgba(0, 0, 0, 0.2);
                    font-weight: bold;
                }
            }

            .banner-right {
                width: 19%;
                height: 100%;

                .icon-img {
                    width: 100%;
                    height: 100%;
                    position: relative;

                    img {
                        width: 100%;
                        height: 100%;
                    }

                    .banner-icon {
                        display: flex;
                        flex-direction: column;
                        position: absolute;
                        bottom: 2%;
                        left: 50%;
                        transform: translateX(-50%);

                        .icon {
                            display: flex;
                            align-items: center;
                            color: #ffffff;
                            font-weight: bold;
                            font-size: 20px;
                            margin-top: 2rem;

                            img {
                                width: 3rem;
                                height: 3rem;
                                margin-right: 1rem;
                            }
                        }
                    }
                }
            }

            .banner {
                width: 23vw;
                height: 23vw;
                border-radius: 50%;
                position: absolute;
                left: 80%;
                transform: translateX(-50%);
                top: 1%;
                overflow: hidden;
                background-color: #fff;

                img {
                    width: 93%;
                    height: 93%;
                    position: relative;
                    left: 50%;
                    top: 50%;
                    transform: translate(-50%, -50%);
                    border-radius: 50%;
                }
            }
        }

        .pic {
            box-sizing: border-box;
            width: 100%;
            margin-top: 2rem;
            padding: 0 2rem;
        }
    }
}

.tabs-pic {
    width: 100%;
    padding: 2rem;

    .top-pic {
        width: 100%;
        margin-bottom: 1rem;

        img {
            width: 100%;
        }
    }

    .footer-pic {
        width: 100%;
        display: flex;
        align-items: center;

        .footer-left {
            width: 70%;
            margin-right: 2%;

            img {
                width: 100%;
            }
        }

        .footer-right {
            width: 28%;
            height: 100%;
            display: flex;
            flex-direction: column;

            img {
                width: 100%;
                margin-bottom: 2rem;
            }
        }
    }
}

:deep(.el-tabs__item) {
    font-size: 26px !important;
    padding-bottom: 1rem;

    &:hover {
        color: #fa8106;
    }
}

:deep(.is-active) {
    color: #fa8106;
}

:deep(.el-tabs__active-bar) {
    background-color: #fa8106 !important;
}

.btn {
    display: inline-block;
    border: 1px solid #333;
    cursor: pointer;
    padding: 0.5rem 2rem;
    margin: 1.5rem 0;
    left: 50%;
    transform: translateX(-50%);
}

.btn:hover {
    border: 1px solid #fa8106;
    color: #fa8106;
}

.allpic {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;

    :deep(.el-divider__text) {
        font-size: 22px;
        font-weight: bold;
    }

    .pic {
        width: 100%;
        font-size: 26px;

        .all-pic {
            width: 95%;
            display: flex;
            flex-direction: column;
            margin-top: 2rem;
            align-items: center;

            .pic1 {
                width: 70%;
                // height: 20rem;
                margin: 0 3rem 3rem 0;
                overflow: hidden;

                img {
                    width: 100%;
                    height: 100%;
                    transition: 0.5s linear;
                }

                img:hover {
                    scale: 1.2;
                }
            }
        }
    }
}

.allpic1 {
    width: 100%;
    text-align: center;
}

.productcenter {
    .door-bgc {
        width: 100%;
        height: 95vh;

        img {
            width: 100%;
            height: 100%;
        }

        .doortitle {
            bottom: 0.5%;
            left: 0;
            width: 100%;
            z-index: 2;
            height: 10%;
            display: flex;
            justify-content: center;
            align-items: center;
            background: rgba(0, 0, 0, 0.2);
        }
    }

    .box {
        width: 90%;
        margin: 1rem auto 0;

        .pagina {
            float: right;
            // margin-bottom: 2rem;
        }
    }
}

@media screen and (max-width: 960px) {
    :deep(.el-tabs__item) {
        font-size: 14px !important;
    }

    .productcenter {
        .allpic {
            width: 100%;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            flex-wrap: wrap;
            margin-top: -2rem;

            :deep(.el-divider__text) {
                font-size: 10px;
                font-weight: bold;
            }

            .pic {
                width: 100%;
                font-size: 26px;

                .all-pic {
                    width: 95%;
                    display: flex;
                    flex-wrap: wrap;
                    margin: auto;
                    margin-top: 1rem;

                    .pic1 {
                        width: 28%;
                        height: 5rem;
                        margin: 0 1rem 1rem 0;
                        overflow: hidden;

                        img {
                            width: 100%;
                            height: 100%;
                            transition: 0.5s linear;
                        }

                        img:hover {
                            scale: 1.2;
                        }
                    }
                }
            }
        }

        .door-bgc {
            width: 100%;
            height: 35%;

            img {
                width: 100%;
                height: 100%;
            }
        }

        .box {
            width: 90%;
            margin: 1rem auto 0;
        }
    }
}</style>

<style>.demo-tabs>.el-tabs__content {
    padding: 10px;
    color: #6b778c;
    font-size: 32px;
    font-weight: 600;
}
</style>