/* 
   Yao Xing Technology - Main Style Sheet 
   Color Palette: Primary Hot Pink (#d8296e), Dark Accent (#222), Neutral Light (#eee/#fff)
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700;900&family=Orbitron:wght@500;700;900&family=Roboto:wght@400;500&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans TC', 'Roboto', '微軟正黑體', sans-serif;
    background-color: #f7f7f7;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul {
    list-style: none;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* Header Area */
.header_area {
    position: relative;
    z-index: 100;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.main_header_area {
    width: 100%;
    padding: 10px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main_header_area .container {
    max-width: 1400px;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-header {
    display: flex;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand img {
    height: 60px;
    width: auto;
}

.nav-brand h1 {
    font-size: 0;
    opacity: 0;
    position: absolute;
}

.nav-brand-m {
    display: none;
}

/* Navigation Menus */
.nav-menus-wrapper {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu > li {
    position: relative;
    padding: 15px 14px;
}

.nav-menu > li > a {
    font-size: 18px;
    font-weight: 500;
    color: #222;
    padding: 5px 0;
    position: relative;
    white-space: nowrap;
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #d8296e;
    transition: width 0.3s;
}

.nav-menu > li:hover > a {
    color: #d8296e;
}

.nav-menu > li:hover > a::after {
    width: 100%;
}

/* Dropdown styling */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border-radius: 4px;
    border-top: 3px solid #d8296e;
    z-index: 10;
}

.nav-menu > li:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown li {
    position: relative;
}

.nav-dropdown li a {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.nav-dropdown li a:hover {
    background: #fdf2f6;
    color: #d8296e;
    padding-left: 25px;
}

/* Sub-dropdown */
.nav-dropdown .nav-dropdown {
    top: 0;
    left: 100%;
    border-top: none;
    border-left: 3px solid #d8296e;
}

.nav-dropdown li:hover > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Top features: Line/Search */
.me_tp_features {
    display: none;
    align-items: center;
    gap: 15px;
}

.box_search {
    position: relative;
}

.shop_search_txt {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    width: 180px;
    transition: all 0.3s;
}

.shop_search_txt:focus {
    width: 220px;
    border-color: #d8296e;
}

.shop_search_btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #d8296e;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.shop_search_btn:hover {
    background: #b5225c;
}

.tp_btn_notice {
    display: flex;
    align-items: center;
    background: #333;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.tp_btn_notice:hover {
    background: #d8296e;
}

/* Slider Banner */
.bannerindex {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    background: #000;
}

.swiper-banner {
    width: 100%;
    height: 100%;
}

.swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    display: none;
}

.swiper-slide.active {
    display: block;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Simple Banner Transition Animations */
.swiper-slide.centerBig img {
    animation: zoomOut 8s ease forwards;
}

@keyframes zoomOut {
    from { transform: scale(1.15); }
    to { transform: transform: scale(1); }
}

.swiper-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.swiper-pagination-bullet.active {
    background: #d8296e;
    width: 25px;
    border-radius: 6px;
}

/* Main Content Part */
.main_part {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

/* Product Box Grid */
.products-box {
    width: 100%;
    position: relative;
}

.products-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.products-list .item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.products-list .item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.products-list .first_box {
    background: linear-gradient(135deg, #111 0%, #222 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    border: none;
    color: white;
    text-align: center;
}

.products-list .first_box h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    letter-spacing: 2px;
    color: #d8296e;
    font-weight: 700;
}

.products-list .first_box span {
    font-size: 16px;
    color: #aaa;
    margin-top: 10px;
    letter-spacing: 1px;
}

.products-list .item a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.products-list .pic {
    width: 100%;
    height: 230px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-list .pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.products-list .item:hover .pic img {
    transform: scale(1.08);
}

.products-list .name {
    padding: 15px 15px 5px 15px;
    font-size: 16px;
    font-weight: 500;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    height: 52px;
}

.products-list .price {
    padding: 5px 15px 15px 15px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.products-list .ori_price {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

.products-list .sp_price {
    font-size: 18px;
    color: #d8296e;
    font-weight: 700;
}

.products-list .more {
    margin: 0 15px 15px 15px;
    padding: 8px 0;
    text-align: center;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s;
}

.products-list .item:hover .more {
    background: #d8296e;
    color: white;
}

/* Arrow view-more link */
.animated-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 40px auto 0 auto;
    color: #d8296e;
    font-weight: 700;
    font-size: 16px;
    gap: 10px;
    transition: all 0.3s;
}

.animated-arrow svg {
    fill: #d8296e;
    transition: transform 0.3s;
}

.animated-arrow:hover {
    color: #b5225c;
}

.animated-arrow:hover svg {
    transform: translateX(8px);
    fill: #b5225c;
}

.stay_mid {
    display: flex;
    max-width: 180px;
    border: 2px solid #d8296e;
    padding: 10px 25px;
    border-radius: 30px;
}

.stay_mid:hover {
    background: #d8296e;
    color: white !important;
}

.stay_mid:hover svg {
    fill: white;
}

/* Recent Announcements Section */
.module_i_news {
    background: #1a1a1a;
    padding: 80px 0;
    color: white;
}

.title_i_box {
    text-align: center;
    margin-bottom: 50px;
}

.title_i_box h4 {
    font-size: 32px;
    color: white;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.title_i_box h4::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: #d8296e;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.module_i_news ul {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.module_i_news li {
    background: #262626;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #333;
}

.module_i_news li:hover {
    transform: translateY(-5px);
    border-color: #d8296e;
    box-shadow: 0 10px 25px rgba(216, 41, 110, 0.1);
}

.module_i_news li a {
    display: flex;
}

.i_blog_le {
    width: 180px;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.i_blog_le img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.module_i_news li:hover .i_blog_le img {
    transform: scale(1.08);
}

.i_blog_ri {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.i_blog_ri h5 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.i_blog_ri em {
    font-style: normal;
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    display: block;
}

.i_blog_ri p {
    font-size: 14px;
    color: #ccc;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Floating social floater */
.fix_ri {
    width: 50px;
    position: fixed;
    bottom: 85px;
    right: 20px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fix_ri a {
    display: block;
    width: 48px;
    height: 48px;
    transition: all 0.3s;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    background: white;
}

.fix_ri a:hover {
    transform: scale(1.1);
}

.fix_ri img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* Page Top Button */
.to_top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: #000;
    color: white;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 99;
}

.to_top i.top {
    border: solid white;
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 4px;
    transform: rotate(-135deg);
    margin-bottom: 3px;
}

/* Footer Section */
.footer {
    background: #111;
    color: #999;
    padding: 60px 0 20px 0;
    font-size: 14px;
    border-top: 4px solid #d8296e;
}

.footer .center {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer_info {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer_logo {
    flex: 1 1 250px;
}

.footer_logo img {
    max-height: 80px;
    margin-bottom: 20px;
}

.footer_info ul {
    flex: 2 1 600px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer_info li {
    flex: 1 1 250px;
}

.footer_info li p {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
}

.footer_info li p::before {
    font-family: 'FontAwesome';
    position: absolute;
    left: 0;
    color: #d8296e;
}

.footer_info li p.tel::before { content: "\f095"; }
.footer_info li p.taxid::before { content: "\f0f7"; }
.footer_info li p.mail::before { content: "\f0e0"; }
.footer_info li p.add::before { content: "\f041"; }
.footer_info li p.add2::before { content: "\f017"; }

.footer_menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.footer_menu a {
    color: #999;
    font-size: 14px;
}

.footer_menu a:hover {
    color: #d8296e;
    padding-left: 5px;
}

.double_key {
    border-top: 1px solid #222;
    padding-top: 25px;
    text-align: center;
    width: 100%;
}

.double_key a {
    color: #555;
    margin: 0 10px;
    font-size: 13px;
    display: inline-block;
}

.double_key a:hover {
    color: #d8296e;
}

.footer .copy {
    text-align: center;
    border-top: 1px solid #222;
    padding-top: 20px;
    margin-top: 20px;
    font-size: 12px;
    color: #555;
}

.footer .copy a {
    color: #444;
}

.total_view {
    margin-left: 15px;
}

/* Hamburger mobile button */
.nav-toggle {
    display: none;
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
}

.nav-toggle::before, .nav-toggle::after, .nav-toggle span {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background: #333;
    position: absolute;
    left: 0;
    transition: all 0.3s;
}

.nav-toggle::before { top: 3px; }
.nav-toggle span { top: 13px; }
.nav-toggle::after { top: 23px; }

/* Responsive Media Queries */
@media screen and (max-width: 1150px) {
    .products-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .module_i_news ul {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 900px) {
    .products-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer_info {
        flex-direction: column;
    }
}

@media screen and (max-width: 768px) {
    .bannerindex {
        height: 320px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menus-wrapper {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        background: #111;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px;
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-menus-wrapper.open {
        left: 0;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
    }

    .nav-menu > li {
        width: 100%;
        padding: 10px 0;
    }

    .nav-menu > li > a {
        color: #fff;
        display: block;
        width: 100%;
    }

    .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        background: #1a1a1a;
        width: 100%;
        transform: none;
        max-height: 0;
        overflow: hidden;
        border-top: none;
        transition: max-height 0.3s ease;
    }

    .nav-menu > li.active-dropdown .nav-dropdown {
        max-height: 500px;
    }

    .nav-dropdown li a {
        color: #bbb;
        border-bottom: 1px solid #222;
        padding-left: 20px;
    }

    .nav-dropdown .nav-dropdown {
        position: static;
        left: 0;
        border-left: none;
        background: #222;
    }

    .nav-brand-m {
        display: block;
        margin-bottom: 30px;
        border-bottom: 1px solid #222;
        padding-bottom: 20px;
        width: 100%;
    }

    .nav-brand-m img {
        max-height: 60px;
    }

    .me_tp_features {
        display: none; /* simple for mobile, or wrap below menu */
    }
    
    .products-list .first_box {
        grid-column: span 2;
    }
}

@media screen and (max-width: 480px) {
    .bannerindex {
        height: 220px;
    }

    .products-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .products-list .first_box {
        grid-column: span 1;
    }
}

/* Global Scroll Animations System */
[data-animate-in] {
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
    will-change: transform, opacity;
}
[data-animate-in="up"] {
    transform: translateY(40px);
}
[data-animate-in="left"] {
    transform: translateX(-40px);
}
[data-animate-in="right"] {
    transform: translateX(40px);
}
[data-animate-in="down"] {
    transform: translateY(-40px);
}
[data-animate-in="fadeIn"] {
    transform: none;
}
[data-animate-in="scaleIn"] {
    transform: scale(0.85);
}
[data-animate-in].in-view {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}
