/* 优象活动券中心 — 活动页样式（现代化、移动端兼容） */

.yc-activity {
    --yc-accent: #2271b1;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px 60px;
    color: #1d2327;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.yc-activity * { box-sizing: border-box; }

/* ───── Hero ───── */
.yc-hero {
    margin: 24px 0 28px;
    border-radius: 18px;
    padding: 56px 32px;
    background: linear-gradient(135deg, var(--yc-accent), #14467a);
    color: #fff;
    text-align: center;
    box-shadow: 0 18px 40px rgba(34, 113, 177, .18);
    background-size: cover;
    background-position: center;
}
.yc-hero.has-banner { color: #fff; }
.yc-hero-inner { max-width: 720px; margin: 0 auto; }
.yc-hero-title {
    margin: 0 0 12px;
    font-size: 38px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}
.yc-hero-sub {
    margin: 0 0 20px;
    font-size: 17px;
    opacity: .92;
}
.yc-hero-countdown {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 15px;
}
.yc-cd-label { margin-right: 8px; opacity: .9; }
.yc-cd-box {
    display: inline-block;
    min-width: 38px;
    padding: 6px 8px;
    background: rgba(255,255,255,.18);
    border-radius: 8px;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    backdrop-filter: blur(4px);
}
.yc-cd-sep { margin: 0 6px 0 2px; opacity: .85; }

/* ───── 通知条 ───── */
.yc-notice {
    margin: 0 0 24px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 15px;
}
.yc-notice-info { background: #e7f3ff; color: #14467a; }
.yc-notice-muted { background: #f0f0f1; color: #646970; }

/* ───── 区块标题 ───── */
.yc-section-head { text-align: center; margin: 36px 0 22px; }
.yc-section-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
}
.yc-section-desc { margin: 0; color: #646970; font-size: 15px; }

/* ───── 优惠券卡片 ───── */
.yc-coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
}
.yc-coupon {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,0,0,.07);
    border: 1px solid #ececf0;
    transition: transform .18s ease, box-shadow .18s ease;
}
.yc-coupon:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.1); }
.yc-coupon.is-disabled { opacity: .55; filter: grayscale(.3); }
.yc-coupon-left {
    position: relative;
    flex: 0 0 118px;
    background: linear-gradient(135deg, var(--yc-accent), #14467a);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    text-align: center;
}
.yc-coupon-left::after {
    content: "";
    position: absolute;
    right: -7px; top: 0; bottom: 0;
    width: 14px;
    background-image: radial-gradient(circle at 7px 7px, #fff 6px, transparent 7px);
    background-size: 14px 18px;
    background-repeat: repeat-y;
}
.yc-coupon-face { font-size: 30px; font-weight: 800; line-height: 1.1; }
.yc-coupon-mintext { margin-top: 6px; font-size: 12px; opacity: .9; }
.yc-coupon-mid {
    flex: 1;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.yc-coupon-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.yc-coupon-sub { font-size: 13px; color: #646970; margin-bottom: 6px; }
.yc-coupon-scope {
    display: inline-block;
    align-self: flex-start;
    font-size: 12px;
    color: var(--yc-accent);
    background: rgba(34,113,177,.08);
    padding: 3px 8px;
    border-radius: 6px;
}
.yc-coupon-right {
    flex: 0 0 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.yc-claim-btn {
    border: none;
    background: var(--yc-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
    white-space: nowrap;
}
.yc-claim-btn:hover:not(:disabled) { background: #14467a; }
.yc-claim-btn:disabled { background: #c3c4c7; cursor: not-allowed; }

/* ───── 活动说明 ───── */
.yc-desc-section { margin-top: 36px; }
.yc-desc-card {
    background: #fff;
    border-radius: 14px;
    padding: 28px 30px;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
    line-height: 1.8;
    font-size: 15px;
    color: #3c434a;
}
.yc-desc-card img { max-width: 100%; height: auto; border-radius: 8px; }

/* ───── 快捷入口 ───── */
.yc-entry-section { margin-top: 40px; }
.yc-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.yc-entry-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 28px 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
    text-decoration: none;
    color: #1d2327;
    transition: transform .18s ease, box-shadow .18s ease;
}
.yc-entry-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.1); }
.yc-entry-card .dashicons {
    font-size: 34px;
    width: 34px;
    height: 34px;
    color: var(--yc-accent);
}
.yc-entry-title { font-size: 16px; font-weight: 700; }
.yc-entry-sub { font-size: 13px; color: #646970; }

/* ───── 我的券钱包 ───── */
.yc-wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.yc-wallet-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,.05);
}
.yc-wallet-face {
    flex: 0 0 auto;
    font-size: 22px;
    font-weight: 800;
    color: #2271b1;
}
.yc-wallet-title { font-weight: 700; font-size: 15px; }
.yc-wallet-sub { font-size: 12px; color: #646970; }
.yc-wallet-exp { font-size: 12px; color: #999; margin-top: 2px; }
.yc-wallet-empty { color: #646970; padding: 20px; text-align: center; }

/* ───── Toast ───── */
.yc-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(29,35,39,.94);
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 99999;
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}
.yc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ───── 结算页券选择器（注入收银台） ───── */
.yc-checkout-coupon {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #e0e0e6;
    border-radius: 10px;
    background: #fafbfc;
}
.yc-checkout-coupon-label {
    font-size: 13px;
    color: #646970;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.yc-checkout-coupon select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d0d6;
    border-radius: 8px;
    font-size: 14px;
}
.yc-checkout-discount {
    margin-top: 8px;
    font-size: 14px;
    color: #d63638;
    font-weight: 600;
}

/* ───── 响应式 ───── */
@media (max-width: 980px) {
    .yc-entry-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .yc-hero { padding: 40px 20px; border-radius: 14px; }
    .yc-hero-title { font-size: 28px; }
    .yc-hero-sub { font-size: 15px; }
    .yc-coupons-grid { grid-template-columns: 1fr; }
    .yc-coupon-left { flex: 0 0 96px; }
    .yc-coupon-face { font-size: 24px; }
    .yc-cd-box { min-width: 32px; font-size: 15px; }
}

/* ───── 适用商品卡片 ───── */
.yc-products-section {
    margin-top: 40px;
    background: #f4f7fb;
    border-radius: 20px;
    padding: 32px 28px;
}
/* 分类标签栏 */
.yc-products-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e8ecf2;
}
.yc-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #646970;
    cursor: pointer;
    transition: all .18s ease;
}
.yc-tab-btn:hover { color: var(--yc-accent); background: rgba(34,113,177,.08); }
.yc-tab-btn.is-active {
    background: var(--yc-accent);
    color: #fff;
}
.yc-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(255,255,255,.25);
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
}
.yc-tab-btn.is-active .yc-tab-count { background: rgba(255,255,255,.32); }
.yc-products-grid {
    display: grid;
    /* 明确 4 列，不依赖容器宽度 */
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.yc-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
    border: 1px solid #e8ecf2;
    transition: transform .18s ease, box-shadow .18s ease;
    cursor: pointer;
}
.yc-product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(34,113,177,.14); border-color: #c5d9f0; }
.yc-product-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #eef1f6;
    flex-shrink: 0;
}
.yc-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .32s ease;
}
.yc-product-card:hover .yc-product-thumb img { transform: scale(1.05); }
/* 类目徽章（插件/课程标识） */
.yc-product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    background: rgba(29,35,39,.56);
    color: #fff;
    backdrop-filter: blur(4px);
    pointer-events: none;
}
.yc-product-badge.is-plugin  { background: rgba(34,113,177,.82); }
.yc-product-badge.is-course  { background: rgba(0,128,96,.82); }
.yc-product-body {
    padding: 12px 14px 8px;
}
.yc-product-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.yc-product-excerpt {
    margin: 0;
    font-size: 12px;
    color: #646970;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.yc-product-footer {
    padding: 8px 14px 14px;
    margin-top: auto;
}
.yc-product-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 8px 0;
    background: var(--yc-accent);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background .15s ease, opacity .15s ease;
}
.yc-product-btn:hover { background: #14467a; color: #fff; opacity: .92; }
@media (max-width: 900px) {
    .yc-products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    .yc-products-section { padding: 24px 16px; border-radius: 14px; }
    .yc-products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 400px) {
    .yc-products-grid { grid-template-columns: 1fr; }
}
