/* ===== 杭州云享付技术服务有限公司商城首页样式 ===== */
/* 作者：自定义样式 */
/* 说明：所有类名使用zh_前缀，避免冲突 */

/* 基础重置和公共样式 */
.zh_reset {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.zh_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.zh_clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.zh_flex {
    display: flex;
    align-items: center;
}

.zh_flex_between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zh_flex_center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 顶部导航栏样式 ===== */
.zh_top_nav {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 8px 0;
    font-size: 13px;
    position: relative;
    z-index: 1000;
}

.zh_top_nav_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zh_top_nav_left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.zh_top_nav_right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.zh_top_nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.zh_top_nav a:hover {
    color: #fff;
}

.zh_top_nav_divider {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
}

/* ===== 主头部样式 ===== */
.zh_header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.zh_header_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo样式 */
.zh_logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.zh_logo img {
    height: 50px;
    margin-right: 12px;
}

.zh_logo_text {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 搜索框样式 */
.zh_search_wrapper {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
}

.zh_search_form {
    position: relative;
    display: flex;
    background: #f8f9fa;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.zh_search_form:focus-within {
    background: #fff;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.zh_search_input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 14px;
    background: transparent;
}

.zh_search_btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border: none;
    color: white;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.zh_search_btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-1px);
}

/* 购物车按钮 */
.zh_cart_btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.zh_cart_btn:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d63031 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.4);
}

.zh_cart_btn::before {
    content: '🛒';
    margin-right: 8px;
    font-size: 16px;
}

/* ===== 导航菜单样式 ===== */
.zh_nav {
    background: linear-gradient(135deg, #37474F 0%, #546E7A 100%);
    padding: 0;
}

.zh_nav_container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.zh_nav_categories {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 15px 25px;
    font-weight: 600;
    border-radius: 0 5px 5px 0;
    position: relative;
}

.zh_nav_categories::after {
    content: '▼';
    margin-left: 10px;
    font-size: 12px;
}

.zh_nav_menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.zh_nav_menu li {
    margin: 0;
}

.zh_nav_menu a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.zh_nav_menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.zh_nav_menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.zh_nav_menu a:hover::before {
    left: 100%;
}

/* ===== Banner样式 ===== */
.zh_banner_section {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 50%, #90CAF9 100%);
    padding: 0;
    margin-bottom: 30px;
}

.zh_banner_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.zh_banner_main {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.zh_banner_image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.zh_banner_main:hover .zh_banner_image {
    transform: scale(1.05);
}

.zh_banner_overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 30px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.zh_banner_main:hover .zh_banner_overlay {
    transform: translateY(0);
}

.zh_banner_title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.zh_banner_desc {
    font-size: 14px;
    opacity: 0.9;
}

/* ===== 侧边栏样式 ===== */
.zh_sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.zh_sidebar_card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.zh_sidebar_card:hover {
    transform: translateY(-5px);
}

.zh_user_info {
    text-align: center;
}

.zh_user_avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 4px solid #2196F3;
}

.zh_user_name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.zh_user_actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.zh_user_btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.zh_user_btn_primary {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

.zh_user_btn_secondary {
    background: linear-gradient(135deg, #81C784 0%, #66BB6A 100%);
    color: white;
}

.zh_user_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.zh_notice_card {
    background: #fff;
}

.zh_notice_title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
    position: relative;
}

.zh_notice_title::before {
    content: '📢';
    margin-right: 8px;
}

.zh_notice_title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.zh_notice_list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.zh_notice_item {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.zh_notice_item:last-child {
    border-bottom: none;
}

.zh_notice_link {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.zh_notice_link:hover {
    color: #2196F3;
}

/* ===== 产品展示区域样式 ===== */
.zh_products_section {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.zh_products_section:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.zh_category_title {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #f8f9fa;
    position: relative;
}

.zh_category_name {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.zh_category_title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-radius: 2px;
}

.zh_products_grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 25px;
    margin-top: 20px;
}

/* 前3个产品各占2列 */
.zh_products_grid .zh_product_card:nth-child(1) {
    grid-column: 1 / 3;
}

.zh_products_grid .zh_product_card:nth-child(2) {
    grid-column: 3 / 5;
}

.zh_products_grid .zh_product_card:nth-child(3) {
    grid-column: 5 / 7;
}

/* 后2个产品居中显示，各占2列 */
.zh_products_grid .zh_product_card:nth-child(4) {
    grid-column: 2 / 4;
}

.zh_products_grid .zh_product_card:nth-child(5) {
    grid-column: 4 / 6;
}

/* 6个或更多产品时的布局 */
.zh_products_grid .zh_product_card:nth-child(n+6) {
    grid-column: auto;
}

.zh_product_card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.zh_product_card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #2196F3;
}

.zh_product_link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.zh_product_image {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.zh_product_image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.zh_product_card:hover .zh_product_image img {
    transform: scale(1.05);
}

.zh_product_image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(33, 150, 243, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zh_product_card:hover .zh_product_image::after {
    opacity: 1;
}

.zh_product_info {
    padding: 20px;
}

.zh_product_name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}

.zh_product_store {
    font-size: 13px;
    color: #2196F3;
    margin-bottom: 10px;
    font-weight: 500;
}

.zh_product_price {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.zh_price_current {
    font-size: 18px;
    font-weight: 700;
    color: #ff5722;
    margin-left: 5px;
}

/* ===== 底部样式 ===== */
.zh_footer {
    background: linear-gradient(135deg, #37474F 0%, #546E7A 100%);
    color: #b2bec3;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.zh_footer_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.zh_footer_content {
    margin-bottom: 30px;
}

.zh_footer_links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.zh_footer_link {
    color: #b2bec3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.zh_footer_link:hover {
    color: #fff;
}

.zh_footer_divider {
    color: #636e72;
    margin: 0 10px;
}

.zh_footer_info {
    line-height: 1.8;
    font-size: 14px;
}

.zh_footer_info p {
    margin: 8px 0;
}

.zh_footer_info a {
    color: #b2bec3;
    text-decoration: none;
}

.zh_footer_info a:hover {
    color: #fff;
}

.zh_footer_beian {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.zh_footer_beian img {
    vertical-align: middle;
}

.zh_footer_bottom {
    border-top: 1px solid #636e72;
    padding-top: 20px;
    text-align: center;
    color: #2196F3;
    font-weight: 500;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .zh_banner_container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .zh_sidebar {
        flex-direction: row;
    }
    
    .zh_sidebar_card {
        flex: 1;
    }
    
    .zh_products_grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    /* 平板端前2个产品各占2列 */
    .zh_products_grid .zh_product_card:nth-child(1) {
        grid-column: 1 / 3;
    }
    
    .zh_products_grid .zh_product_card:nth-child(2) {
        grid-column: 3 / 5;
    }
    
    /* 后面的产品各占2列，自动换行 */
    .zh_products_grid .zh_product_card:nth-child(3) {
        grid-column: 1 / 3;
    }
    
    .zh_products_grid .zh_product_card:nth-child(4) {
        grid-column: 3 / 5;
    }
    
    .zh_products_grid .zh_product_card:nth-child(5) {
        grid-column: 2 / 4;
    }
}

@media (max-width: 768px) {
    .zh_header_container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .zh_search_wrapper {
        margin: 0;
        max-width: 100%;
        order: 3;
        width: 100%;
    }
    
    .zh_nav_container {
        flex-direction: column;
    }
    
    .zh_nav_categories {
        width: 100%;
        text-align: center;
        border-radius: 0;
    }
    
    .zh_nav_menu {
        width: 100%;
        flex-direction: column;
    }
    
    .zh_nav_menu a {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .zh_footer_links {
        flex-direction: column;
        gap: 15px;
    }
    
    .zh_top_nav_container {
        flex-direction: column;
        gap: 10px;
    }
    
    .zh_sidebar {
        flex-direction: column;
    }
    
    .zh_products_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* 手机端恢复默认布局 */
    .zh_products_grid .zh_product_card {
        grid-column: auto;
    }
    
    .zh_products_section {
        padding: 20px;
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .zh_banner_main {
        border-radius: 10px;
    }
    
    .zh_banner_image {
        height: 250px;
    }
    
    .zh_sidebar_card {
        padding: 15px;
        border-radius: 10px;
    }
    
    .zh_user_actions {
        flex-direction: column;
    }
    
    .zh_container,
    .zh_header_container,
    .zh_nav_container,
    .zh_banner_container,
    .zh_footer_container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .zh_products_grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 超小屏幕单列布局 */
    .zh_products_grid .zh_product_card {
        grid-column: auto;
    }
    
    .zh_category_name {
        font-size: 20px;
    }
    
    .zh_products_section {
        padding: 15px;
        border-radius: 10px;
    }
}

/* ===== 动画效果 ===== */
@keyframes zh_fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zh_animate_fadeInUp {
    animation: zh_fadeInUp 0.6s ease-out;
}

@keyframes zh_pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.zh_animate_pulse {
    animation: zh_pulse 2s infinite;
}

/* ===== 工具类 ===== */
.zh_text_center {
    text-align: center;
}

.zh_text_left {
    text-align: left;
}

.zh_text_right {
    text-align: right;
}

.zh_mb_10 {
    margin-bottom: 10px;
}

.zh_mb_20 {
    margin-bottom: 20px;
}

.zh_mt_10 {
    margin-top: 10px;
}

.zh_mt_20 {
    margin-top: 20px;
}

.zh_hidden {
    display: none;
}

.zh_visible {
    display: block;
}
