/*
Theme Name: Drink Water
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: 一个带有下拉菜单的WordPress主题
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: drink-water
*/

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 内页（除首页和产品页）需要顶部间距 */
body:not(.home):not(.single-product) {
    padding-top: 90px;
}

/* 顶部横条 */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #a5456e;
    z-index: 999;
    padding: 4px 0;
}

/* WordPress管理工具栏适配 */
.admin-bar .top-bar {
    top: 32px;
}

.top-bar p {
    margin: 0;
    text-align: center;
    font-size: 14px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 页眉样式 */
.site-header {
    position: fixed;
    top: 50px;
    left: 30px;
    right: 30px;
    z-index: 998;
}

/* WordPress管理工具栏适配 */
.admin-bar .site-header {
    top: 82px;
}

/* 页眉容器 */
.header-container {
    background-color: #40001c;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, box-shadow 0.4s ease;
}

.header-container.menu-open {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* 首页透明背景 */
.home .header-container {
    background-color: transparent;
    box-shadow: none;
}

/* 首页滚动或展开后的背景 */
.home .header-container.scrolled,
.home .header-container.menu-open {
    background-color: #40001c;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 页眉导航栏 */
.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

/* Logo样式 */
.site-logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff90c0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-logo:hover {
    color: #fff;
}

/* 图标样式 */
.menu-toggle,
.cart-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.menu-toggle:hover,
.cart-icon:hover {
    transform: scale(1.1);
}

.menu-toggle i,
.cart-icon i {
    font-size: 24px;
    color: #ff90c0;
}

/* 购物车数量显示 */
.cart-count {
    font-size: 24px;
    color: #ff90c0;
    font-weight: 600;
    line-height: 1;
    font-family: 'Air Up Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: color 0.3s ease;
}

/* 当数量为0时隐藏 */
.cart-count:empty,
.cart-count:not(:empty)[data-count="0"] {
    display: none;
}

/* 下拉菜单样式 */
.dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 30px;
}

.dropdown-menu.active {
    max-height: 1000px;
    padding: 20px 30px 30px 30px;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu.closing {
    max-height: 0;
    padding: 0 30px;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.25s,
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.25s;
}

.menu-content {
    color: #fff;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-menu.active .menu-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

.dropdown-menu.closing .menu-content {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Elementor内容样式支持 */
.menu-content .elementor-widget-wrap {
    width: 100%;
}

.menu-content a {
    color: inherit;
    text-decoration: none;
}

.menu-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* 主内容区域 */
.site-content {
    max-width: 1440px;
    margin: 40px auto;
    padding: 0 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .site-header {
        top: 10px;
        left: 15px;
        right: 15px;
    }
    
    .admin-bar .site-header {
        top: 56px;
    }
    
    .admin-bar .top-bar {
        top: 46px;
    }
    
    /* 手机端页眉始终显示背景色 */
    .home .header-container {
        background-color: #40001c;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
    
    .header-nav {
        padding: 10px;
    }
    
    .site-logo {
        font-size: 20px;
    }
    
    .menu-toggle i,
    .cart-icon i {
        font-size: 20px;
    }
    
    /* 移动端购物车数量 */
    .cart-count {
        font-size: 20px;
    }
    
    .menu-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dropdown-menu.active {
        padding: 20px;
    }
}

/* ==========================================
   页脚样式
   ========================================== */

.site-footer {
    background-color: #40001c;
    color: #ff90c0;
    font-family: 'Poppins', sans-serif;
    padding: 60px 20px 40px;
 
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Logo */
.footer-logo {
    margin-bottom: 40px;
}

.footer-logo a {
    color: #ff90c0;
    text-decoration: none;
    font-size: 32px;
    font-weight: 700;
    display: inline-block;
}

.footer-logo img {
    max-height: 50px;
    width: auto;
}

/* 主菜单（大写） */
.footer-menu-primary {
    margin-bottom: 20px;
}

.footer-menu-primary .footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    align-items: center;
}

.footer-menu-primary .footer-menu-list li {
    margin: 0;
    padding: 0 15px;
    position: relative;
}

/* 竖线分隔符 */
.footer-menu-primary .footer-menu-list li:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ff90c0;
    font-weight: 400;
}

.footer-menu-primary .footer-menu-list a {
    color: #ff90c0;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease;
}

.footer-menu-primary .footer-menu-list a:hover {
    opacity: 0.7;
}

/* 次菜单（首字母大写） */
.footer-menu-secondary {
    margin-bottom: 30px;
}

.footer-menu-secondary .footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    align-items: center;
}

.footer-menu-secondary .footer-menu-list li {
    margin: 0;
    padding: 0 10px;
    position: relative;
}

/* 竖线分隔符 */
.footer-menu-secondary .footer-menu-list li:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ff90c0;
    font-weight: 300;
}

.footer-menu-secondary .footer-menu-list a {
    color: #ff90c0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    text-transform: capitalize;
    transition: opacity 0.3s ease;
}

.footer-menu-secondary .footer-menu-list a:hover {
    opacity: 0.7;
}

/* 版权信息 */
.footer-copyright {
    margin-bottom: 15px;
}

.footer-copyright p {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
}

/* 附加信息 */
.footer-info {
    margin-top: 10px;
}

.footer-info p {
    margin: 0;
    font-size: 13px;
    font-weight: 300;
    opacity: 0.9;
}

/* 响应式 - 页脚 */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 20px 30px;
     
    }
    
    .footer-logo {
        margin-bottom: 30px;
    }
    
    .footer-logo a {
        font-size: 28px;
    }
    
    /* 主菜单：竖排显示，居中，隐藏分割线 */
    .footer-menu-primary .footer-menu-list {
        flex-direction: column;
        gap: 3px;
        align-items: center;
    }
    
    .footer-menu-primary .footer-menu-list li {
        padding: 0;
    }
    
    /* 隐藏主菜单的分割线 */
    .footer-menu-primary .footer-menu-list li:not(:last-child)::after {
        display: none;
    }
    
    .footer-menu-primary .footer-menu-list a {
        font-size: 20px;
    }
    
    /* 次菜单：字体缩小，横排显示，自动换行，有分割线 */
    .footer-menu-secondary .footer-menu-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        align-items: center;
        justify-content: center;
    }
    
    .footer-menu-secondary .footer-menu-list li {
        padding: 0 8px;
    }
    
    /* 保留次菜单的分割线 */
    .footer-menu-secondary .footer-menu-list li:not(:last-child)::after {
        display: block;
    }
    
    .footer-menu-secondary .footer-menu-list a {
        font-size: 11px;
    }
}

