:root {
    --primary-color: #6daa3a;
}

body {
    font-family: sans-serif;
}

.container {
    max-width: 75rem;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.coupon-card {
    border-radius: 20px 0 20px 0;
}

.hot-pick {
    position: absolute;
    top: -10px;
    left: 0px;
    background-color: var(--primary-color);
    color: white;
    padding: 2px 6.5px;
    font-size: 0.75rem;
    border-radius: 10px 0 10px 0;
    z-index: 10;
}

.ad {
    overflow: hidden;
}


.ad-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.5rem;
    display: inline-block;
    padding: 2px 6px;
    background-color: #f3f4f6; /* 浅灰色背景，等同于 Tailwind 的 bg-gray-100 */
}

.code-display {
    font-family: monospace;
    word-break: break-all;
    max-width: 100%;
}

.show-code-icon {
    font-size: 1.5rem; /* 增大字体 */
    font-weight: bold; /* 加粗字体 */
}

.text-center {
    text-align: center; /* 居中对齐 */
}

/* .brand-logo {
    width: 50%; 
    height: auto;
    display: block;
    margin: 0 auto; 
} */

.discount span{
    white-space: normal; /* 允许正常的换行 */
    word-break: break-word; /* 强制在单词内断行 */
    overflow-wrap: break-word; /* 自动换行 */
    word-wrap: break-word; /* 在必要时允许单词内断行 */

}

.dynamicDiscountDisplay {
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px; /* 根据需要调整 */
}

@media (min-width: 768px) {
    .coupon-card {
        height: 110px;
    }
    .coupon-card .discount {
        width: 80px;
        height: 80px;
        font-size: 1.1rem;
    }
    .coupon-card .title {
        font-size: 1.1rem;
    }
    .coupon-card .meta {
        font-size: 0.9rem;
    }
    .coupon-card .show-code {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    /* .brand-logo {
        width: 80px; 
        height: auto;
        margin: 0 auto;
    } */
}

/* 移动端样式 */
@media (max-width: 767px) {
    .show-code {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        font-size: 1.2rem;
        transition: all 0.3s ease;
        text-decoration: none;
        position: relative; /* 添加相对定位 */
    }

    .show-code:hover {
        transform: scale(1.1);
    }

    .show-code-icon {
        position: absolute; /* 使用绝对定位 */
        top: 45%;
        left: 53%;
        transform: translate(-50%, -50%); /* 使用 transform 进行精确居中 */
        line-height: 0;
        text-align: center;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

}

/* PC 端 "Show Code" / "Get Deal" 按钮样式 */
@media (min-width: 768px) {
    .show-code.hidden.md\:block {
        display: inline-block;
        padding: 0.5rem 1.25rem; /* 减小上下内边距，保持左右内边距 */
        font-size: 0.875rem; /* 稍微减小字体大小 */
        border-radius: 8px; /* 减小边框半径，使按钮不那么圆 */
        transition: all 0.3s ease;
        text-decoration: none;
        line-height: 1.5; /* 确保文本垂直居中 */
    }

    .show-code.hidden.md\:block:hover {
        background-color: #71e611; /* 深色悬停效果 */
    }
}

/* @media (min-width: 1024px) {
    .brand-logo {
        width: 100px; 
        height: auto;
        margin: 0 auto;
    }
} */

@media (max-width: 767px) {
    .order-1 {
        order: 1;
    }
    .order-2 {
        order: 2;
    }
    .coupon-detail-card {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        width: calc(100% + 1rem);
    }
}

@media (min-width: 768px) {
    .md\:order-1 {
        order: 1;
    }
    .md\:order-2 {
        order: 2;
    }
    .md\:w-1\/3 {
        width: 33.333333%;
    }
    .md\:w-2\/3 {
        width: 66.666667%;
    }
}

/* 确保 sidebar 内容在移动端时正确显示 */
@media (max-width: 767px) {
    .bg-white.rounded-lg.shadow {
        margin-bottom: 1rem;
    }
}

/* 确保 sidebar 内容在移动端时正确显示 */
@media (max-width: 767px) {
    .bg-white.rounded-lg.shadow {
        margin-bottom: 1rem;
    }
}

