html, body {
    height: 100%;
    margin: 0;
}
body {
    display: flex;
    flex-direction: column;
}
.content {
    flex: 1;
}
.card {
  background-color: #f5f5f5; /* 浅灰色背景 */
  padding: 20px;
  border-radius: 4px; /* 圆角边框 */
  width: 100%; /* 卡片宽度，可以根据需要调整 */
  margin: auto; /* 水平居中 */
  border: 0px;
  margin-bottom: 10px;
  box-shadow: 0 0.1rem 0.3rem rgba(0, 0, 0, 0.1);
  background-size: cover;
  background-position: center;
}
.btn-success {
  background-color: #1abc9c;
  border-color: #1abc9c;
}
.btn-success:hover {
  background-color: #16a085;
}
.social-icons a {
  color: #3498db;
  transition: color 0.3s ease;
}
.social-icons a:hover {
  color: #2980b9;
}
footer {
  font-size: 0.9rem;
}
.col-md-4, .col-md-6, .col-md-8, .col-md-12 {
    padding-left: 0px;
    padding-right: 0px;
}
.btn.btn-primary {
    width: 30%;
    height: 30%;
}
#checkout_btn {
    width: 100% !important;
    height: auto !important;
}
/* 响应式设计：如果屏幕宽度小于600px，调整卡片宽度 */
@media (max-width: 600px) {
  .card {
    width: 100%;
  }
  .btn.btn-primary {
    width: 60%;
  }
}
@media (max-width: 768px) {
  .btn-lg {
    width: 100%;
    font-size: 1.2rem;
  }
  .social-icons a {
    font-size: 1.5rem;
  }
}
/* 确保 Quill 编辑器内部的文本样式与 <body> 一致 */
.ql-editor {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 1rem;
    line-height: 1.5;
}
.divider-with-text {
    text-align: center;
    position: relative;
}
.divider-with-text hr {
    height: 1px;
    border: none;
    width: 50%;
    margin: 0 auto;
    background: linear-gradient(
        to left,
        rgba(204, 204, 204, 0) 0%,
        rgba(204, 204, 204, 1) 40%,
        rgba(204, 204, 204, 1) 60%,
        rgba(204, 204, 204, 0) 100%
    );
    position: relative;
    z-index: 1;
}
.divider-with-text span {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 0 10px;
  font-size: 1rem;
  z-index: 2;
}
@media (max-width: 768px) {
  .divider-with-text {
    text-align: center;
    position: relative;
    margin: 20px 0;
  }
  .divider-with-text::before {
    content: '';
    display: block;
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(
      to left,
      rgba(180, 180, 180, 0) 0%,
      rgba(180, 180, 180, 1) 40%,
      rgba(180, 180, 180, 1) 60%,
      rgba(180, 180, 180, 0) 100%
    );
    position: relative;
    z-index: 1;
  }
  .divider-with-text span {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 10px;
    font-size: 1.1rem;
    z-index: 2;
  }
}

#bubble-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* 不影响点击事件 */
  overflow: hidden;
  z-index: 0;
}
.bubble {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(100, 150, 255, 0.05); /* 更浅的背景色 */
  padding: 10px;
  text-align: center;
  color: #555;
  font-size: 18px;
  animation: floatUp linear infinite;
  left: 0;
  bottom: -50px;
  /* 增加模糊效果 */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.bubble i.fa {
  opacity: 0.6;
  font-size: 16px;
}
@keyframes floatUp {
  from {
    bottom: -50px; /* 起始位置在屏幕下方 */
    transform: scale(1);
    opacity: 1;
  }
  to {
    bottom: 100vh; /* 向上移动出屏幕 */
    transform: scale(1.5);
    opacity: 0;
  }
}
.card-with-overlay {
    position: relative;
    height: 150px;
    border-radius: 8px;                 /* 圆角 */
    overflow: hidden;                   /* 防止内容超出 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* 投影 */
}

.card-img-overlay-gradient::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.6) 20%,     /* 左侧深色遮罩 */
        rgba(0, 0, 0, 0.2) 70%,     /* 中间渐弱 */
        rgba(0, 0, 0, 0.2) 100%       /* 右侧透明过渡 */
    );
    z-index: 1;
}
.card-img-overlay-text {
    z-index: 2;
    color: #fff;
    display: flex;
    align-items: left;
    justify-content: left;
    height: 100%; /* 确保填充卡片 */
    padding: 5px;
}
.card-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.4;
    max-height: calc(1.4em * 2); /* 限制为两行高度 */
}
.complaint-floating-icon {
    position: fixed;
    right: 40px;
    bottom: 160px;
    width: 48px;
    height: 100px;
    background-color: rgba(52, 152, 219, 0.9); /* 半透明蓝 */
    color: white;
    border: 0px;
    border-radius: 8px; /* 修改为圆角矩形 */
    text-align: center;
    line-height: normal; /* 重置行高 */
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-lr; /* 文字竖排 */
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    text-decoration: none;
    transition: background-color 0.3s ease;
    padding: 10px 0; /* 上下留白 */
}
.complaint-floating-icon:hover {
    background-color: #2980b9; /* 深一点的蓝 */
    color: black;
}
.faq-floating-icon {
    position: fixed;
    right: 40px;
    bottom: 100px;
    width: 48px;
    height: 48px;
    background-color: rgba(52, 152, 219, 0.9); /* 半透明蓝 */
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 48px;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1050; /* 高于模态框 */
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.faq-floating-icon:hover {
    background-color: #2980b9; /* 深一点的蓝 */
    color: black;
}

.card-header-tabs {
    margin-left: 0px !important;
}

.nav-tabs .nav-link {
    border: 0 !important;
}
#paymentTab .nav-link.active,
#paymentTab .nav-link:hover {
  border-bottom: 2px solid #0d6efd !important;
  color: #0d6efd !important;
  background-color: transparent !important;
}

/* Bootstrap 默认 Modal 居中显示，我们修改为右侧弹出 */
.modal-dialog.modal-right {
    position: fixed;
    top: 0;
    right: 0; /* 靠右对齐 */
    bottom: 0;
    margin: 0;
    width: 300px; /* 设置宽度，可自定义 */
    max-width: 100%;
    height: 100%;
    transform: none; /* 取消默认居中变换 */
    transition: transform 0.3s ease;
}
.modal-content {
    border-radius: 0; /* 去掉圆角 */
    height: 100%;
    border: none;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2); /* 添加左侧阴影 */
}
.poster-container {
    position: relative;
    margin: auto;
    background: linear-gradient(135deg, #ffffff, #f9f9f9, #f0f4f8);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.poster-main-image {
    width: calc(100% - 30px); /* 减去左右 margin */
    height: 100%;
    object-fit: cover;
    margin-left: 15px;
    margin-right: 15px;
}
.poster-seller {
    padding: 0 15px 15px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    margin-top: 25px;
    font-size: 24px;
}
.poster-title {
    padding: 15px 15px 15px 30px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    font-size: 24px;
}
#poster-preview .ql-container {
    border: none !important; /* 移除边框 */
    height: auto !important; /* 允许高度自动调整 */
}
.poster-footer {
    position: relative;
    margin-top: 60px;
    margin-left: 60px;
    margin-right: 60px;
    bottom: 30px;
    left: 0;
    right: 0;
    padding: 0 10px;
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#feedbackModal .modal-dialog {
    /* PC端占用50%宽度 */
    width: 50vw;
    max-width: 800px;
    margin: 1.75rem auto;
}
/* 手机端适配 */
@media (max-width: 768px) {
    #feedbackModal .modal-dialog {
        /* 手机端占用80%宽度 */
        width: 80vw;
        max-width: none;
        margin: 10px;
    }
    .faq-floating-icon {
        right: 20px;
        bottom: 40px;
    }
    .complaint-floating-icon {
        right: 20px;
        bottom: 100px;
    }
}
/* 小屏幕手机优化 */
@media (max-width: 480px) {
    #feedbackModal .modal-dialog {
        width: 95vw;
        margin: 5px;
    }
}

/* 普通海报移动端适配 */
@media (max-width: 768px) {
    .poster-footer {
        margin-left: 20px !important;
        margin-right: 20px !important;
        margin-top: 40px !important;
        padding: 0 8px !important;
        font-size: 11px !important;
    }
    
    .poster-footer > div:first-child {
        width: 55% !important;
        min-width: 0 !important;
    }
    
    .poster-footer #poster-qr {
        min-width: 80px !important;
        flex-shrink: 0 !important;
    }
}

.form-control {
    font-size: 14px; /* 设置输入框字体大小 */
}

.price-section {
    margin-bottom: 15px;
}

.original-price-wrapper,
.discount-price-wrapper,
.discount-tag-wrapper {
    display: block;
    margin: 5px 0;
}

.original-price {
    font-size: 0.9em;
    margin-right: 10px;
}

.discount-price {
    color: #e74c3c; /* 红色突出折扣价 */
}

.discount-badge {
    vertical-align: middle;
}

/* 小红书海报样式 */
.xhs-poster-container {
    position: relative;
    margin: auto;
    background: linear-gradient(135deg, #ff2442 0%, #ff6b81 50%, #ff2442 100%);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(255, 36, 66, 0.3);
}

.xhs-poster-main-image {
    width: calc(100% - 40px);
    height: 300px;
    object-fit: cover;
    margin-left: 20px;
    margin-right: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.xhs-poster-title {
    padding: 20px 20px 10px 20px;
    font-weight: bold;
    color: #ffffff;
    font-size: 26px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.xhs-poster-marketing {
    padding: 10px 20px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.8;
    min-height: 100px;
}

.xhs-poster-marketing .ql-container {
    border: none !important;
    height: auto !important;
    color: #ffffff !important;
}

.xhs-poster-footer {
    position: relative;
    margin-top: 40px;
    margin-left: 40px;
    margin-right: 40px;
    padding: 15px;
    font-size: 14px;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

/* 微信公众号海报样式 */
.wx-poster-container {
    position: relative;
    margin: auto;
    background: linear-gradient(135deg, #07c160 0%, #06ad56 50%, #059a4c 100%);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(7, 193, 96, 0.3);
}

.wx-poster-main-image {
    width: calc(100% - 40px);
    height: 300px;
    object-fit: cover;
    margin-left: 20px;
    margin-right: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wx-poster-seller {
    padding: 20px 20px 10px 0px;
    font-weight: bold;
    color: #ffffff;
    display: flex;
    align-items: center;
    font-size: 22px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.wx-poster-title {
    padding: 10px 20px;
    font-weight: bold;
    color: #ffffff;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.wx-poster-marketing {
    padding: 10px 20px;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.8;
    min-height: 100px;
}

.wx-poster-marketing .ql-container {
    border: none !important;
    height: auto !important;
    color: #ffffff !important;
}

.wx-poster-footer {
    position: relative;
    margin-top: 40px;
    margin-left: 40px;
    margin-right: 40px;
    padding: 15px;
    font-size: 14px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

/* 海报移动端适配 */
@media (max-width: 768px) {
    .xhs-poster-footer,
    .wx-poster-footer {
        margin-left: 15px !important;
        margin-right: 15px !important;
        padding: 12px !important;
        font-size: 13px !important;
    }
    
    .wx-poster-footer > div:first-child {
        width: 55% !important;
        min-width: 0 !important;
    }
    
    .wx-poster-footer #wx-poster-qr {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px !important;
        flex-shrink: 0 !important;
    }
}

.cart-item-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.cart-item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}
.cart-item-card.selected {
    border-color: #007bff;
    background-color: #f0f7ff;
}
.item-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}
.product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}
/* 购物车商品缩略图 */
.cart-item-img {
    width: 120px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}
/* 购物车商品标题：最多2行，超出省略 */
.cart-item-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}
/* 价格区域：禁止换行，防止数字逐字折行 */
.cart-item-price,
.cart-item-price-original {
    white-space: nowrap;
    font-size: 16px;
}
.cart-item-price-original {
    text-decoration: line-through;
    margin-bottom: 2px;
}
/* 手机端调整 */
@media (max-width: 575px) {
    .cart-item-img {
        width: 80px;
        height: 70px;
    }
    .cart-item-price,
    .cart-item-price-original {
        font-size: 14px;
    }
    /* 手机端缩小复选框和图片间距 */
    #checkbox_container {
        padding-right: 4px !important;
    }
    #image_container {
        padding-left: 4px !important;
        padding-right: 6px !important;
    }
}
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}
.empty-cart i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}
.promotion-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.badge-promotion {
    font-size: 12px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}