/* Trang Mã giảm giá Shopee & TikTok (dùng chung nền .affp từ partners.css) */
.affv { --shopee: #ee4d2d; --tiktok: #111; --tt-pink: #fe2c55; --tt-cyan: #25f4ee; }
.affv-hero { text-align: center; padding: 28px 16px 26px; margin: 0 -16px; background: radial-gradient(700px 300px at 90% 0%, #ffe0d6, transparent 70%), radial-gradient(600px 300px at 0% 100%, #e6fbfb, transparent 70%), #fff7f3; border-radius: 0 0 28px 28px; }
.affv-hero .affp-sub { max-width: 640px; margin: 0 auto; }
.affv-plat { display: inline-flex; min-width: 0; gap: 6px; padding: 5px; margin-top: 20px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 4px 0 var(--ink); max-width: 100%; overflow-x: auto; }
.affv-plat a { padding: 10px 18px; border-radius: 999px; font-weight: 800; font-size: 15px; color: var(--ink) !important; white-space: nowrap; }
.affv-plat a small { font-weight: 600; opacity: .6; margin-left: 2px; }
.affv-plat a.is-on { background: var(--ink); color: #fff !important; }
.affv-plat a.is-shopee.is-on { background: var(--shopee); }
.affv-plat a.is-tiktok.is-on { background: var(--tiktok); box-shadow: 2px 0 0 var(--tt-pink), -2px 0 0 var(--tt-cyan); }

.affv-bar { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 24px -16px 16px; padding: 10px 16px; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.admin-bar .affv-bar { top: 32px; }
.affv-tabs { display: inline-flex; background: #f3f1ef; padding: 4px; border-radius: 12px; gap: 2px; }
.affp .affv-tabs button { margin: 0; padding: 8px 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.affp .affv-tabs button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.affv-tabs small { opacity: .65; }
.affv-chips { contain: inline-size; flex: 1 1 320px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; justify-content: flex-end; }
.affv-chips::-webkit-scrollbar { display: none; }
.affp .affv-chips button { flex: none; margin: 0; padding: 7px 12px; font-size: 13px; font-weight: 600; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.affp .affv-chips button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

.affv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 14px; }
.affv-card { position: relative; display: flex; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.affv-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.07); }
.affv-card__stub { position: relative; flex: none; width: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 6px; color: #fff; text-align: center; background: var(--shopee); }
.affv-card.is-tiktok .affv-card__stub { background: var(--tiktok); box-shadow: inset -3px 0 0 var(--tt-pink); }
.affv-card__stub::before, .affv-card__stub::after { content: ""; position: absolute; right: -9px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 1px solid var(--line); }
.affv-card__stub::before { top: -9px; } .affv-card__stub::after { bottom: -9px; }
.affv-card__plat { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; margin-bottom: 6px; }
.affv-card__stub small { font-size: 12px; font-weight: 600; opacity: .9; }
.affv-card__stub strong { font-size: 24px; line-height: 1.05; font-weight: 900; letter-spacing: -.03em; }
.affv-card.is-soon .affv-card__stub { background: repeating-linear-gradient(135deg, #9aa0a6 0 10px, #8a9096 10px 20px); }
.affv-card__body { flex: 1; min-width: 0; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.affv-card__body h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.affv-hot { display: inline-block; padding: 1px 6px; margin-left: 4px; font-size: 10.5px; font-style: normal; font-weight: 800; color: #fff; background: #ff3b30; border-radius: 4px; vertical-align: 2px; }
.affv-card__cond { margin: 0; font-size: 13px; color: #444; }
.affv-card__cats { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 0; }
.affv-card__cats span { padding: 2px 7px; font-size: 11.5px; background: #f5f2ef; border-radius: 6px; color: #555; }
.affv-used { height: 6px; margin-top: 6px; background: #f1ebe6; border-radius: 999px; overflow: hidden; }
.affv-used span { display: block; height: 100%; background: linear-gradient(90deg, #ffb199, var(--shopee)); border-radius: 999px; }
.affv-card.is-tiktok .affv-used span { background: linear-gradient(90deg, var(--tt-cyan), var(--tt-pink)); }
.affv-card__meta { display: flex; justify-content: space-between; gap: 8px; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.affv-card__meta .is-hot { color: #d0021b; font-weight: 700; }
.affv-card__act { margin-top: auto; padding-top: 8px; }
.affv-card.is-tiktok .affp-code { border-color: var(--tiktok); }
.affv-card.is-tiktok .affp-code__btn, .affv-card.is-tiktok .affv-btn { background: var(--tiktok); }
.affv-card.is-shopee .affp-code { border-color: var(--shopee); }
.affv-card.is-shopee .affp-code__btn, .affv-card.is-shopee .affv-btn { background: var(--shopee); }
.affv-card.is-soon .affp-code__btn, .affv-card.is-soon .affv-btn { background: #6b7280; }
.affv-btn { width: 100%; }

/* Hướng dẫn áp mã (đầu trang) */
.affv-how { margin: 18px 0 0; padding: 14px 16px 12px; background: #fff; border: 2px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); }
.affv-how__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.affv-how__head h2 { margin: 0; flex: 1 1 auto; font-size: 17px; font-weight: 800; }
.affv-how__head h2 span { font-weight: 600; font-size: 13.5px; color: var(--muted); }
.affv-how__sw { display: inline-flex; gap: 2px; padding: 3px; background: #f3f1ef; border-radius: 10px; }
.affp .affv-how__sw button { margin: 0; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.affp .affv-how__sw button.is-on { color: #fff; background: var(--shopee); }
.affp .affv-how__sw button.is-tiktok.is-on { background: var(--tiktok); }
.affp .affv-how__fold { margin: 0 0 0 auto; padding: 6px 10px; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: underline; cursor: pointer; }
.affv-how__steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: none; }
.affv-how__steps li { position: relative; display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; background: #fff7f3; border-radius: 12px; }
.affv-how__body.is-tiktok .affv-how__steps li { background: #f2fbfb; }
.affv-how__steps li:not(:last-child)::after { content: "›"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 800; color: #c9c2bc; z-index: 1; }
.affv-how__steps i { flex: none; font-style: normal; font-size: 22px; line-height: 1; }
.affv-how__steps strong { display: block; font-size: 14px; }
.affv-how__steps p b { color: var(--ink); }
.affv-how__steps p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: #555; }
.affv-how__warn { margin: 10px 0 0; padding: 8px 12px; font-size: 13px; line-height: 1.5; color: #7a4a00; background: #fff6dc; border: 1px solid #f5d98a; border-radius: 10px; }
.affv-how.is-folded .affv-how__body { display: none; }
.affv-how.is-folded .affv-how__sw { display: none; }
@media (max-width: 860px) {
	.affv-how__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.affv-how__steps li::after { display: none; }
}
@media (max-width: 480px) {
	.affv-how { padding: 12px; }
	.affv-how__steps { grid-template-columns: 1fr; gap: 6px; }
	.affv-how__steps li { padding: 8px 10px; }
}

.affv-guide { margin-top: 40px; }
.affv-guide__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; margin-top: 14px; }
.affv-guide__col { padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; border-top: 4px solid var(--shopee); }
.affv-guide__col.is-tiktok { border-top-color: var(--tiktok); }
.affv-guide__col h3 { margin: 0 0 8px; font-size: 16px; }
.affv-guide__col ol { margin: 0 0 0 18px; padding: 0; font-size: 14px; line-height: 1.6; }
.affv-guide__col li { margin-bottom: 4px; }
.affv-note { margin: 18px auto 0; max-width: 720px; font-size: 12.5px; color: #8a8a8a; text-align: center; }
.affv--mini { padding: 0; max-width: none; }

@media (max-width: 720px) {
	.affv-plat { gap: 2px; padding: 4px; }
	.affv-plat a { padding: 9px 11px; font-size: 13.5px; }
}
@media (max-width: 380px) {
	.affv-plat a small { display: none; }
}
@media (max-width: 720px) {
	.affv-bar { margin-left: -16px; margin-right: -16px; }
	.affv-chips { justify-content: flex-start; flex-basis: 100%; }
	.affv-card__stub { width: 88px; }
	.affv-card__stub strong { font-size: 20px; }
}
@media (max-width: 782px) { .admin-bar .affv-bar { top: 46px; } }
