/**
 * 跨境电商自定义页脚样式
 * Cross Border App Footer Styles
 */

:root {
    --cb-footer-bg: #ffffff;
    --cb-footer-text: #333333;
    --cb-footer-text-secondary: #666666;
    --cb-footer-accent: #e67e22;
    --cb-footer-border: #eeeeee;
    --cb-footer-max-width: 1200px;
}

/* 页脚主容器 */
.cb-footer-wrapper {
    background-color: var(--cb-footer-bg);
    color: var(--cb-footer-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    border-top: 1px solid var(--cb-footer-border);
    padding: 30px 0;
    width: 100%;
}

.cb-footer-container {
    max-width: var(--cb-footer-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 20px;
}

/* 三栏布局与垂直分割线 */
.cb-footer-section {
    flex: 1;
    padding: 0 30px;
    box-sizing: border-box;
}

.cb-footer-section:not(:last-child) {
    border-right: 1px solid var(--cb-footer-border);
}

.cb-footer-section:first-child {
    padding-left: 0;
}

.cb-footer-section:last-child {
    padding-right: 0;
}

/* 左侧：Logo和简易链接 */
.cb-footer-about {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.cb-footer-logo {
    margin-bottom: 20px;
}

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

.cb-footer-mini-links {
    font-size: 12px;
    color: var(--cb-footer-accent);
    display: flex;
    flex-wrap: wrap;
    gap: 0; /* 使用 margin 控制间距以配合分隔符 */
    line-height: 1.6;
}

.cb-footer-mini-links a {
    color: var(--cb-footer-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.cb-footer-mini-links a:hover {
    opacity: 0.8;
}

.cb-footer-mini-links span:not(:last-child)::after,
.cb-footer-mini-links a:not(:last-child)::after {
    content: '|';
    margin: 0 6px;
    color: #ccc;
}

/* 中间：描述文本 */
.cb-footer-description {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.cb-footer-desc-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
}

.cb-footer-desc-text {
    font-size: 12px;
    color: var(--cb-footer-text-secondary);
    line-height: 1.8;
}

/* 右侧：商业信息 */
.cb-footer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.cb-footer-info-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
}

.cb-footer-info-list {
    font-size: 11px;
    color: var(--cb-footer-text-secondary);
    line-height: 1.8;
}

.cb-footer-info-item {
    margin-bottom: 6px;
}

/* 隐藏底部原有的版权条（合并到右侧） */
.cb-footer-bottom {
    display: none;
}

/* 响应式适配 */
@media screen and (max-width: 992px) {
    .cb-footer-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cb-footer-section {
        width: 100%;
        border-right: none !important;
        border-bottom: 1px solid var(--cb-footer-border);
        padding: 20px 0;
        align-items: flex-start;
        text-align: left;
    }
    
    .cb-footer-section:last-child {
        border-bottom: none;
    }
    
    .cb-footer-about {
        margin-bottom: 10px;
    }
}

/* 微信弹窗 */
.cb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.cb-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.cb-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    color: #333;
}

.cb-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.cb-modal-close:hover {
    color: #333;
}

.cb-modal-content h4 {
    margin: 0 0 20px;
    font-size: 18px;
}

.cb-modal-content img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
}

/* 响应式布局 */
@media screen and (max-width: 992px) {
    .cb-footer-about {
        width: 100%;
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
    }
    
    .cb-footer-links,
    .cb-footer-social {
        width: 50%;
        padding-left: 0;
        text-align: center;
    }
    
    .cb-footer-section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .cb-footer-contact-item {
        justify-content: center;
    }
    
    .cb-footer-social-links {
        justify-content: center;
    }
}

@media screen and (max-width: 576px) {
    .cb-footer-main {
        padding: 40px 15px 30px;
    }
    
    .cb-footer-links,
    .cb-footer-social {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .cb-footer-links {
        margin-bottom: 0;
    }
    
    .cb-footer-logo img {
        max-width: 150px;
    }
    
    .cb-footer-brand {
        font-size: 18px;
    }
    
    .cb-footer-contact-item {
        font-size: 13px;
    }
    
    .cb-footer-section-title {
        font-size: 15px;
    }
    
    .cb-footer-link-list a {
        font-size: 14px;
    }
    
    .cb-social-link {
        width: 36px;
        height: 36px;
    }
    
    .cb-social-link svg {
        width: 18px;
        height: 18px;
    }
    
    .cb-footer-copyright,
    .cb-footer-beian {
        font-size: 12px;
    }
}

/* 清除浮动 */
.cb-footer-container::after {
    content: '';
    display: table;
    clear: both;
}

/* 动画效果 */
@keyframes cb-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cb-footer-wrapper {
    animation: cb-fadeInUp 0.6s ease-out;
}
