@charset "utf-8";
@font-face {
    font-family: 'iconfont';
    src: url('../fonts/iconfont.woff2') format('woff2'), url('../fonts/iconfont.woff') format('woff'), url('../fonts/iconfont.ttf') format('truetype');
}

.iconfont {
    font-family: "iconfont" !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@font-face {
    font-family: DINProM;
    src: url('../font/DINPro-Medium.eot');
    src: url('../font/DINPro-Medium.eot?#iefix') format('embedded-opentype'),
    url('../font/DINPro-Medium.woff') format('woff'),
    url('../font/DINPro-Medium.ttf') format('truetype'),
    url('../font/DINPro-Medium.svg') format('svg');
}

/* Theme Variables */
:root {
    /* Light Mode (Default) */
    --bg-color: #F2F4F7;
    --text-color: #21282D;
    --text-color-secondary: #505B64;
    --text-color-light: #788190;
    --card-bg: #FFFFFF;
    --border-color: rgba(0, 0, 0, 0.05);
    --primary-color: #0EB790;
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-text: #21282D;
    --footer-bg: #181C29;
    --footer-text: rgba(255, 255, 255, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.05);
    --float-btn-bg: #007bff;
    --float-btn-text: #fff;
    --invert-icon: 0;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-color: #0a0e17;
    --text-color: #e0e0e0;
    --text-color-secondary: #a0a0a0;
    --text-color-light: #777;
    --card-bg: #151a27;
    --border-color: rgba(255, 255, 255, 0.05);
    --primary-color: #0EB790;
    --header-bg: rgba(10, 14, 23, 0.9);
    --header-text: #fff;
    --footer-bg: #05070a;
    --footer-text: #666;
    --shadow-color: rgba(14, 183, 144, 0.1);
    --float-btn-bg: rgba(30, 35, 45, 0.9);
    --float-btn-text: #fff;
    --invert-icon: 1;
}

/* reset */
* {
    margin: 0;
    padding: 0;
    font-weight: normal;
    box-sizing: border-box;
}

body, th, td, button, input, select, textarea {
    font: 14px/1.6 "Microsoft YaHei", Arial, Tahoma, Helvetica, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: antialiased;
    resize: none;
    color: var(--text-color);
}

html, body {
    width: 100%;
    min-width: 320px;
    background: var(--bg-color);
    transition: background 0.3s, color 0.3s;
}

body {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    cursor: pointer;
    color: var(--text-color-secondary);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

img {
    border: 0;
    vertical-align: middle;
    max-width: 100%;
}

i, s, b, em {
    font-style: normal;
}

input:focus, textarea:focus, select:focus {
    outline: none;
}

.fl { float: left; }
.fr { float: right; }
.clear:after { content: ''; display: block; clear: both; }

.w12 {
    width: 1200px;
    margin: 0 auto;
    max-width: 100%;
    padding: 0 15px;
}

.flex {
    display: flex;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    height: 60px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.header .w12 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header_nav, .header_r {
    display: flex;
    align-items: center;
}

.header_nav .nav_item {
    position: relative;
    margin-right: 32px;
}

.header_nav .nav_item .nav_a {
    display: block;
    font-size: 15px;
    color: var(--header-text);
    line-height: 60px;
    font-weight: 500;
}

.header_r .btn {
    display: flex;
    width: 104px;
    height: 36px;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    transition: all .3s;
    font-weight: bold;
}

.header_r .login_btn {
    color: var(--primary-color);
    background: transparent;
    border: 1px solid var(--primary-color);
}

.header_r .reg_btn {
    color: #fff;
    background: var(--primary-color);
    margin-left: 15px;
}

.header_r .login_btn:hover {
    background: rgba(14, 183, 144, 0.1);
}

.header_r .reg_btn:hover {
    background: #0ccfa3;
    opacity: 0.9;
}

.header_nav .nav_item:hover .nav_a, .header_nav .nav_item.on .nav_a {
    color: var(--primary-color);
}

.header_nav .nav_item.on:after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    content: '';
    height: 2px;
    background: var(--primary-color);
}

/* Theme Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-right: 15px; /* Same spacing as between login/reg buttons */
    height: 36px; /* Match button height */
}

.theme-switch {
    display: inline-block;
    height: 26px; /* Switch height */
    position: relative;
    width: 50px;
    margin-bottom: 0;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}

.slider.round {
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 3px;
    content: "";
    height: 20px;
    left: 3px;
    position: absolute;
    transition: .4s;
    width: 20px;
    border-radius: 50%;
    z-index: 2;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider i {
    font-size: 12px;
    color: #fff;
    z-index: 1;
}

.slider .fa-sun {
    margin-left: 2px;
    display: none; /* Hide sun by default in light mode (unchecked) logic */
}
.slider .fa-moon {
    margin-left: auto;
    margin-right: 3px;
}
input:checked + .slider .fa-sun {
    display: block;
    margin-left: 4px;
}
input:checked + .slider .fa-moon {
    display: none;
}

/* Nav Dropdown */
.nav_child {
    position: absolute;
    left: -20px;
    top: 60px;
    width: 300px;
    background: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 10px;
    display: none;
    z-index: 1000;
}

.nav_item:hover .nav_child {
    display: block;
}

.nav_child_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 50px;
    transition: all .3s;
    padding: 0 12px;
    border-radius: 6px;
}

.nav_child_item:hover {
    background: var(--bg-color);
}

.nav_child_item span {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-color);
}

.nav_child_item span img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    margin-right: 12px;
}

.nav_child_item em {
    font-family: DINProM;
    color: #FE574A;
}

/* Footer */
.rtb_footer {
    width: 100%;
    background: var(--footer-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.rtb_footer .foot_nav {
    display: flex;
    padding: 50px 0;
    flex-wrap: wrap;
}

.rtb_footer .item {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 250px;
    margin-bottom: 20px;
}

.rtb_footer .item img {
    width: 48px;
    height: 48px;
}

.rtb_footer .item .r {
    display: flex;
    flex-direction: column;
    padding-left: 15px;
}

.rtb_footer .item h4 {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.rtb_footer .item p {
    color: var(--footer-text);
    font-size: 13px;
    margin-top: 8px;
}

.rtb_footer .footer_bot {
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 13px;
    color: var(--footer-text);
}

.footer_links {
    margin-top: 15px;
}

.footer_links a {
    color: var(--footer-text);
    margin: 0 10px;
    transition: color 0.3s;
}

.footer_links a:hover {
    color: var(--primary-color);
}

/* Floating Button */
.float-button {
    position: fixed;
    top: 50%; /* Center vertically */
    right: 1%;
    /* transform is handled by specific buttons or generic translateY(-50%) if stacked */
    background-color: #007bff;
    color: #fff;
    font-size: 15px;
    padding: 1px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s;
}

.float-button:hover {
    background: var(--primary-color);
    /* transform handled below */
    box-shadow: 0 5px 25px rgba(14, 183, 144, 0.4);
}

.float-button i {
    font-size: 20px;
    margin-bottom: 2px;
}

.float-button span {
    font-size: 12px;
}

.extra-icon {
    font-size: 18px;
    margin-top: 2px;
}

/* Return Top */
.return_top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
    display: none;
}

.return_top .item {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.return_top .item:hover {
    background: var(--primary-color);
    color: #fff;
}

.return_top .item i {
    color: var(--text-color);
    font-size: 20px;
}
.return_top .item:hover i {
    color: #fff;
}

/* Common Title */
.common_title {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 80px 0 50px 0;
}

.common_title h2 {
    font-size: 32px;
    color: var(--text-color);
    font-weight: bold;
    letter-spacing: 1px;
}

.common_title p {
    font-size: 16px;
    color: var(--text-color-secondary);
    margin-top: 15px;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    .w12 {
        width: 100%;
        padding: 0 10px;
    }
    
    .header {
        height: 60px; /* Consistent height */
    }
    
    .header_nav {
        display: none; /* Hide nav on mobile */
    }
    
    .header .w12 {
        display: flex;
        justify-content: space-between; /* Space between logo (left) and buttons (right) */
        align-items: center;
        position: relative;
    }
    
    /* Logo adjustments for mobile */
    .header_logo {
        display: flex !important;
        align-items: center;
        margin-right: auto !important; /* Push everything else to the right */
        z-index: 1001; 
        max-width: 50%; 
        text-decoration: none;
    }
    .header_logo img {
        height: 30px !important; 
        margin-right: 5px !important;
    }
    .header_logo span {
        font-size: 18px !important; 
        white-space: nowrap;
        color: var(--primary-color);
        font-weight: bold;
    }

    .header_r {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        position: static; 
        height: 100%; 
        z-index: 1000;
        pointer-events: auto;
    }

    .theme-switch-wrapper {
        margin-right: 8px; /* Reduced spacing */
        margin-top: 0;
    }

    .header_r .btn {
        width: auto;
        padding: 0 8px; /* Reduced padding */
        height: 30px;
        font-size: 12px;
    }
    
    .header_r .reg_btn {
        margin-left: 8px;
    }
    
    .rtb_footer .foot_nav {
        flex-direction: column;
        padding: 30px 15px;
    }
    
    .rtb_footer .item {
        width: 100%;
        margin-bottom: 30px;
    }

    .float-button {
        width: 50px;
        height: 50px;
        right: 10px;
    }
    
    .float-button[onclick*="shopping"] {
        top: 50% !important;
        transform: translateY(-60px); 
    }

    .float-button[onclick*="comment"] {
        top: 50% !important;
        transform: translateY(0);
    }
}
