/* Site Footer Styles */
.site-footer {
    background-color: rgba(246, 246, 250, 1);
    padding-top: 60px;
    padding-bottom: 30px;
    font-size: 14px;
    color: #666;
    margin-top: 0 !important; /* Override mt-2 if needed */
}

.site-footer .logo {
    height: 60px;
    width: auto;
    margin-bottom: 15px;
}

.site-footer h5 {
    font-size: 16px;
    color: #333;
    font-weight: bold;
    margin-bottom: 20px;
}

.site-footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.site-footer a:hover {
    color: rgba(0, 0, 0, 1);
}

.site-footer .footer-link-item {
    display: block;
    margin-bottom: 10px;
}

.site-footer .contact-item {
    margin-bottom: 10px;
}

.site-footer .qr-box {
    text-align: center;
    display: inline-block;
    margin-right: 20px;
}

.site-footer .qr-box:last-child {
    margin-right: 0;
}

.site-footer .qr-img {
    width: 120px; /* Adjusted size for better visibility */
    height: auto;
    margin-bottom: 5px;
}

.site-footer .copyright-row {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    font-size: 12px;
    line-height: 1.8;
}

.site-footer .copyright-row .item {
    margin: 0 10px;
    display: inline-block;
}

.site-footer .copyright-row img {
    vertical-align: middle;
    margin-right: 3px;
}

/* Desktop Social Icons with Hover QR Code */
.footer-social-icons {
    display: flex;
    align-items: center;
}

.social-icon-item {
    position: relative;
    cursor: pointer;
    margin-right: 48px;
}

.social-icon-item:last-child {
    margin-right: 0;
}

.social-icon-item .social-icon {
    width: 36px;
    height: 36px;
    display: block;
    transition: opacity 0.3s;
}

.social-icon-item:hover .social-icon {
    opacity: 0.8;
}

.social-qr-bubble {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 12px;
    background: #fff;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: auto;
    border: 1px solid #eee;
    white-space: nowrap;
}

.social-icon-item:hover .social-qr-bubble {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

/* Third bubble (Business) special styling */
.social-icon-item:last-child .social-qr-bubble {
    left: auto;
    right: -42px;
    transform: none;
    animation: fadeInCustom 0.2s ease-out;
}

.social-icon-item:last-child .social-qr-bubble .bubble-arrow {
    left: auto;
    right: 54px;
    transform: rotate(45deg);
}

.social-qr-bubble img {
    width: auto;
    height: 212px;
    display: block;
    border-radius: 16px;
}

.social-qr-bubble .bubble-arrow {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeInCustom {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .site-footer {
        text-align: left;
        padding-top: 30px;
        padding-bottom: 20px;
    }
    .site-footer .col-12 {
        margin-bottom: 20px;
    }
    /* .site-footer .d-flex {
        justify-content: center;
    } */

    .site-footer h5 {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .site-footer .col-6,
    .site-footer .col-8,
    .site-footer .col-4 {
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 20px;
    }

    .site-footer .contact-item {
        font-size: 12px;
        margin-bottom: 6px;
        color: #666;
    }

    /* Mobile Follow Us */
    .mobile-follow-us .follow-item {
        display: flex;
        align-items: center;
        margin-bottom: 8px;
        font-size: 12px;
        color: #666;
        position: relative;
        cursor: pointer;
        width: fit-content;
    }
    .mobile-follow-us .wechat-icon-sm {
        width: 16px;
        height: 16px;
        margin-right: 6px;
        object-fit: contain;
    }

    /* WeChat Bubble */
    .wechat-bubble {
        display: none;
        position: absolute;
        bottom: 25px;
        left: 50%;
        margin-left: -60px; /* Center relative to parent */
        background: #fff;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        z-index: 100;
        width: 120px;
        border: 1px solid #eee;
    }

    .wechat-bubble.active {
        display: block;
    }

    .wechat-bubble img {
        width: 100%;
        height: auto;
        display: block;
    }

    .bubble-arrow {
        position: absolute;
        bottom: -5px;
        left: 50%;
        margin-left: -5px; /* Center relative to bubble */
        width: 10px;
        height: 10px;
        background: #fff;
        transform: rotate(45deg);
        border-bottom: 1px solid #eee;
        border-right: 1px solid #eee;
    }

    /* Friendly Links Grid */
    .site-footer .links-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px 5px; /* row-gap col-gap */
    }

    .site-footer .footer-link-item {
        font-size: 12px;
        margin-bottom: 0;
        color: #666;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Key Account Manager Modal */
    .kam-modal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: transparent;
        z-index: 2000;
        justify-content: center;
        align-items: flex-end;
        padding-bottom: 40px;
    }

    .kam-modal-overlay.active {
        display: flex;
    }

    .kam-modal-content {
        background: #fff;
        border-radius: 12px;
        padding: 16px 16px 18px 16px;
        width: 90%;
        max-width: 360px;
        position: relative;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .kam-modal-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 14px;
        height: 14px;
        cursor: pointer;
        display: block;
    }

    .kam-modal-title {
        font-size: 14px;
        font-weight: 600;
        color: #333;
        text-align: center;
        margin-bottom: 12px;
        line-height: 1.4;
        padding: 0 10px;
    }

    .kam-modal-img {
        width: 100%;
        height: auto;
        display: block;
        margin-bottom: 12px;
    }

    .kam-modal-buttons {
        display: flex;
        justify-content: space-between;
        gap: 8px;
    }

    .kam-btn {
        flex: 1;
        height: 32px;
        background-color: #ff3e51;
        color: #fff !important;
        font-size: 12px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        white-space: nowrap;
    }

    .kam-btn:hover {
        opacity: 0.9;
    }

    /* Copyright Section */
    .site-footer .copyright-row {
        text-align: left;
        padding-top: 15px;
        margin-top: 10px;
        border-top: 1px solid #eee;
    }
    .site-footer .copyright-row .item {
        margin: 0 10px 5px 0;
        display: inline-block;
        font-size: 12px;
        color: #999;
        line-height: 1.5;
    }
    .site-footer .copyright-row .mb-2 {
        margin-bottom: 5px !important;
    }

    /* Add top margin to Friendly Links column in mobile view */
    .mobile-links-col {
        margin-top: 20px;
    }