
/*  大体布局，不影响原有代码 */
.page-wrap {
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    width: 98%;
    max-width: 1550px;
}

.moe-container{
    display: flex;
    gap: 30px;
    width: 100%;
    margin: 0 auto;
}

 .gift-detail {
    width: 100%;
    max-width: 1030px;
    margin: 20px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    overflow: visible;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.9), 0 5px 15px rgba(255, 122, 147, 0.75);
    border: 1px solid #f9ccd7;
    transition: all 0.3s ease;    
    position: relative; /* 绝对定位的参考点 */
    overflow: visible !important; /* 禁止裁剪溢出的广告 */
    z-index: 999 !important; /* 父容器层级拉满 */
}

.gift-detail:hover{
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.9), 0 8px 20px rgba(255, 122, 147, 0.2);
    transform: translateY(-3px); /* 轻微上浮 */
}

.gift-detail img {
    max-width: 300px;
    border-radius: 8px;
    margin-bottom: 20px;
}


/* 右侧边栏内部模块容器 */
.aright-sidebar {
  width: 27%;
  flex-shrink: 0;
}
/* 左侧边栏内部模块容器 */
.left-content {
  display: flex;
  flex-direction: column;
  align-items: center; /* 让模块水平居中 */
  width: 100%;
}
/* 右侧内部模块容器 */
.sidebar-sticky {
  width: 100%;
  box-sizing: border-box;
  margin: 20px auto;
}
/* 右侧广告 */
.acategory-gg {
  background: #ffffff;
  border: 2px solid #f9ccd7;
  border-radius: 10px;
  padding: 1px;
  margin-bottom: 17px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.9), 0 5px 15px rgba(255, 122, 147, 0.75);
  transition: all 0.3s ease;
  /* 新增：让容器成为图片的参考基准 */
  position: relative;
  overflow: hidden; /* 超出部分隐藏 */
}

/* 新增：图片自适应样式 */
.acategory-gg img {
  display: block; /* 去掉图片默认的行内空白 */
  width: 100%; /* 宽度铺满容器 */
  height: auto; /* 高度自动，保持比例 */
  max-width: 100%; /* 最大宽度不超过容器 */
  border-radius: 6px; /* 可选：和容器圆角呼应，更美观 */
}

/* 可选：a标签也铺满，点击区域更大 */
.acategory-gg a {
  display: block;
  width: 100%;
}

/* 模块悬停效果 */
.acategory-gg:hover {
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.9), 0 8px 20px rgba(255, 122, 147, 0.2);
  transform: translateY(-3px);
}

.a-module {
  background: #ffffff;
  border: 2px solid #f9ccd7;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 17px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.9), 0 5px 15px rgba(255, 122, 147, 0.75);
  transition: all 0.3s ease;
}

/* 模块悬停效果 */
.a-module:hover {
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.9), 0 8px 20px rgba(255, 122, 147, 0.2);
  transform: translateY(-3px);
}

/* 模块标题 */
.a-module-title {
  font-size: 18px;
  color: #ff7a93;
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px dashed #f9ccd7;
  transition: transform 0.3s ease;

}

/* 标题装饰 */
.a-module-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 40px;
  height: 2px;
  background: #ff6b6b;
}

.a-module-title:hover {
  transform: scale(1.05);
}

/* 登录表单样式 */
.alogin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aform-group {
  width: 100%;
}

.aform-group input {
  width: 90%;
  padding: 10px 12px;
  border: 1px solid #f0e6e6;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.aform-group input:focus {
  border-color: #ff6b6b;
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.1);
}

/* 验证码区域 */
.captcha-group {
  display: flex;
  gap: 10px;
}

#captcha-img {
  width: 100px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff6b6b;
  font-weight: bold;
  letter-spacing: 3px;
}

/* 登录按钮 */
.alogin-btn {
  width: 100%;
  padding: 10px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.alogin-btn:hover {
  background: #ff4a4a;
}

/* 注册链接 */
.aregister-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: #666;
  font-size: 14px;
  text-decoration: none;
}

.aregister-link:hover {
  color: #ff6b6b;
  text-decoration: underline;
}

/* 用户信息区域 */
.auser-info {
  text-align: center;
  padding: 10px 0;
}

.auser-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 18px;
  border: 4px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: linear-gradient(to bottom, #fff, #fff), linear-gradient(135deg, #ff7a93, #ffb6c1);
  box-shadow: 0 5px 12px rgba(255, 122, 147, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auser-avatar:hover {
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(255, 105, 180, 0.4);
}

.auser-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.afont-bold {
  text-align: center;
  margin: 0;
  font-size: 17px;
}

/* 分类列表样式 */
.acategory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.acategory-item {
  padding: 8px 15px;
  background-color: #ffe4eb;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 6px rgba(255, 122, 147, 0.2);
  text-decoration: none;
  margin: 3px;
}

.acategory-item:hover {
  background: #ff6b6b;
  color: white;
  transform: scale(1.05);
}

/* 列表样式 */
.a-module-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.a-module-list li {
  padding: 12px 0;
  border-bottom: 1px dashed #f9ccd7;
  font-size: 15px;
  line-height: 1.6;
  transition: all 0.3s ease;
}

.a-module-list li:last-child {
  border-bottom: none;
}

.a-module-list li:hover {
  background-color: rgba(255, 238, 245, 0.4);
  padding-left: 8px;
}
#categorys-btn {
    display: inline-block;
    background-color: rgb(240, 240, 240);
    color: rgb(51, 51, 51);
    margin-left: 5px;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(255, 189, 189);
    border-image: initial;
    border-radius: 4px;
    text-decoration: none !important;
}

/* 可选：加个hover效果，和其他页面完全同步 */
#categorys-btn:hover {
    background-color: #ffe6e6;
    border-color: #ff9e9e;
    color: #d93535;
}



.gift-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.gift-price {
    color: #ff5252;
    font-size: 18px;
    margin-bottom: 15px;
}

.gift-description {
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    text-decoration: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
}

.btn-scan {
    background-color: #ffb400;
}

.btn-taobao {
    background-color: #ff4500;
}

/* 相关推荐样式 */
.related-gifts {
    width: 90%;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.related-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.gifts-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.gift-card {
    text-decoration: none;
    color: #333;
    display: block;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.gift-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gift-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gift-card-content {
    padding: 10px;
}

.gift-card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gift-card-price {
    color: #ff5252;
    font-size: 14px;
}

.more-btn-container {
    text-align: center;
}

.more-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ff7e5f;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.more-btn:hover {
    background-color: #ff5e3f;
}

/* 分享按钮样式 */
.share-buttons {
    margin-top: 1px;
}

.share-buttons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    margin-right: 10px;
    color: white;
    text-decoration: none;
    font-size: 20px;
}

.share-buttons a.fa-weixin {
    background-color: #1aad19;
}

.share-buttons a.fa-weibo {
    background-color: #e6162d;
}

.share-buttons a.fa-qq {
    background-color: #00bcf2;
}

.share-buttons a:hover {
    opacity: 0.8;
}

/* 二维码弹窗样式 */
.qr-code-modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.qr-code-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 300px;
    text-align: center;
    border-radius: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 广告组容器 - 最终完美版 */
.ad-group {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 30%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* 核心修复：提升层级 + 固定定位兜底 */
    z-index: 9999 !important; /* 远高于二级导航栏的z-index */
    pointer-events: auto; /* 确保鼠标事件正常 */
}

.ad-row {
    display: flex;
    gap: 10px;
}

.ad-item {
    flex: 1; /* 平均分配宽度 */
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #eee;
    background-color: #f9f9f9; /* 占位背景色 */
}

.ad-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.ad-item:hover img {
    opacity: 0.9;
}

/* 响应式优化 - 合并媒体查询 */
/* ========================================== */
/*  礼物详情页 - 移动端专属优化（只动这里） */
/* ========================================== */
@media (max-width: 768px) {
    .page-wrap {
        width: 100% !important;
        padding: 10px !important;
        margin: 0 auto !important;
    }

    .moe-container {
        display: block !important;
        width: 100% !important;
    }

    /* 左侧内容全屏 */
    .left-content {
        width: 100% !important;
        display: block !important;
    }

    /* 右侧边栏隐藏 */
    .aright-sidebar {
        display: none !important;
    }

    /* 礼物详情主体 */
    .gift-detail {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        margin: 10px 0 20px !important;
        position: relative !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    /* 图片自适应 */
    .gift-detail img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto 15px !important;
        border-radius: 8px !important;
    }

    /* 右上角广告组 - 移动端完美固定 */
    .ad-group {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        left: 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-bottom: 15px !important;
        z-index: 999 !important;
    }

    .ad-row {
        display: flex !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .ad-item {
        flex: 1 !important;
        height: 60px !important;
        min-width: 47% !important;
    }

    /* 标题、价格、描述 */
    .gift-title {
        font-size: 20px !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
    }

    .gift-price {
        font-size: 16px !important;
    }

    .gift-description {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    /* 按钮组 */
    .btn-group {
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin: 15px 0 !important;
    }

    .btn {
        flex: 1 !important;
        min-width: 45% !important;
        text-align: center !important;
        padding: 10px 0 !important;
    }

    /* 分享按钮 */
    .share-buttons {
        margin: 15px 0 10px !important;
        text-align: left !important;
    }

    .share-buttons a {
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
        font-size: 16px !important;
        margin-right: 6px !important;
    }

    /* 相关推荐 */
    .related-gifts {
        width: 100% !important;
        padding: 15px !important;
        margin: 20px 0 !important;
        box-sizing: border-box !important;
    }

    .gifts-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .gift-card img {
        height: 140px !important;
    }

    .gift-card-content {
        padding: 8px !important;
    }
}

/* 超小屏（iPhone 小屏） */
@media (max-width: 480px) {
    .gift-detail {
        padding: 12px !important;
    }

    .ad-item {
        height: 52px !important;
    }

    .gifts-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .gift-card img {
        height: 125px !important;
    }
}