
/* 右侧浮动菜单样式 */
.buy-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    /* 默认缩回状态：向右偏移，只留出约 60px 的宽度 (可根据 buy1 宽度调整) */
    transform: translateY(-50%) translateX(calc(100% - 60px));
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* 平滑的伸缩动画 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 激活状态：完全伸出 */
.buy-sidebar.active {
    transform: translateY(-50%) translateX(0);
}

/* 主体图片 buy2 */
.buy-main {
    display: block;
    width: auto;
    height: auto;
    max-height: 200px; /* 限制最大高度，缩小一倍 */
}

/* 箭头图标 buy1 (叠加层) */
.buy-arrow {
    position: absolute;
    left: 15px; /* 距离左边距远一点 */
    top: 50%;
    transform: translateY(-50%);
    width: 37.5px; /* 限制箭头宽度，缩小1.2倍 */
    height: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none; /* 让点击穿透到父容器 */
}

/* 当菜单伸出时，隐藏箭头 */
.buy-sidebar.active .buy-arrow {
    opacity: 0;
}

/* 叠加在 buy2 上的内容容器 */
.buy-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%; /* 内容宽度限制 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px; /* 标题和按钮的间距 */
    opacity: 0; /* 默认隐藏内容 */
    transition: opacity 0.3s ease;
    pointer-events: none; /* 默认不阻挡，激活时开启 */
}

/* 激活状态时显示内容 */
.buy-sidebar.active .buy-content {
    opacity: 1;
    pointer-events: auto; /* 允许点击按钮 */
    transition-delay: 0.2s; /* 等待滑出后再显示内容 */
}

/* 标题样式 */
.buy-title {
    color: #fff; /* 假设 buy2 背景较深 */
    font-family: 'ZiYouFangHuaTi', sans-serif;
    font-size: 36px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* 增加阴影防止背景干扰 */
    white-space: normal; /* 允许换行 */
    letter-spacing: 8px; /* 字间距大一些 */
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 购买按钮样式 */
.buy-btn {
    display: inline-block;
    padding: 10px 30px;
    background-color: #62AFBB; /* 蓝色按钮 */
    color: #fff;
    font-family: 'ZiYouFangHuaTi', sans-serif;
    font-size: 24px;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    transform: translateX(-30px); /* 按钮在左边一点位置 */
}

.buy-btn:hover {
    transform: translateX(-30px) scale(1.1); /* 放缩一下 */
}

.buy-btn:active {
    transform: scale(0.95);
}

/* 移动端适配 */
@media screen and (max-width: 992px) {
    .buy-sidebar {
        display: none !important; /* 移动端完全隐藏侧边栏 */
    }
}
