/* =============================================================
   SUPERAPROVEITE — Cupons (sa-ch__)
   CSS compartilhado entre cupomShow.php e cupons-recentes.php.
   ============================================================= */

/* ── Card ── */
.sa-ch__article {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sa-ch__card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 16px;
	padding: 16px;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
	height: 100%;
	box-sizing: border-box;
}

.sa-ch__card:hover {
	box-shadow: 0 6px 20px rgba(0,0,0,0.09);
	transform: translateY(-2px);
}

/* ── Ribbon ── */
.sa-ch__ribbon {
	position: absolute;
	top: 14px;
	left: -34px;
	transform: rotate(-45deg);
	padding: 3px 40px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.5px;
	z-index: 1;
	pointer-events: none;
}
.sa-ch__ribbon--cupom { background: #febe00; color: #1a1a1a; }
.sa-ch__ribbon--promo { background: #1a1a1a; color: #febe00; }

/* ── Topo: logo + meta + whatsapp ── */
.sa-ch__top {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-left: 14px; /* espaço para o ribbon */
}

.sa-ch__logo-wrap {
	width: 52px;
	height: 52px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8f8f8;
	border-radius: 10px;
	overflow: hidden;
}
.sa-ch__logo-wrap a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.sa-ch__logo-wrap picture { display: contents; }
.sa-ch__logo-img {
	max-width: 48px;
	max-height: 48px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.sa-ch__meta {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1;
	min-width: 0;
}
.sa-ch__store {
	font-size: 14px;
	font-weight: 800;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sa-ch__expiry {
	font-size: 11px;
	color: #888;
	display: flex;
	align-items: center;
	gap: 4px;
}

/* WhatsApp — só aparece no cupomShow (página de cupons) */
.sa-ch__whatsapp {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #f0f0f0;
	color: #25D366;
	font-size: 16px;
	text-decoration: none;
	flex-shrink: 0;
	transition: background 0.15s ease;
}
.sa-ch__whatsapp:hover { background: #e0f5e8; }

/* ── Reset global de links dentro do card ──
   Sobrescreve estilos do tema (color: blue, text-decoration: underline)
   em todos os links dentro de qualquer card sa-ch__.
── */
.sa-ch__card a,
.sa-ch__card a:link,
.sa-ch__card a:visited,
.sa-ch__card a:hover,
.sa-ch__card a:active {
	color: #1a1a1a;
	text-decoration: none !important;
}

/* ── Título / Descrição ── */
.sa-ch__title-link {
	text-decoration: none !important;
	color: #1a1a1a !important;
}
.sa-ch__desc {
	font-size: 13px;
	color: #1a1a1a !important;
	font-weight: 600;
	line-height: 1.45;
	margin: 0;
	/* Home: limita 2 linhas */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
/* Página de cupons: exibe título completo */
.sa-ch__desc--full {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}

/* ── Ações ── */
.sa-ch__actions {
	display: flex;
	align-items: stretch;
	gap: 8px;
	margin-top: auto;
}

/* Botão revelar cupom */
.sa-ch__reveal-btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 12px;
	background: #f4f4f4;
	border: 1.5px dashed #ccc;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 700;
	color: #1a1a1a;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
	min-width: 0;
	text-align: center;
	font-family: inherit;
}
.sa-ch__reveal-btn:hover {
	background: #fffbe6;
	border-color: #febe00;
}

/* Código escondido por padrão */
.sa-ch__reveal-code {
	display: none;
	font-family: monospace;
	font-size: 14px;
	font-weight: 900;
	letter-spacing: 2px;
	color: #1a1a1a;
}

/* Estado revelado */
.sa-ch__card.sa-ch--revealed .sa-ch__reveal-label { display: none; }
.sa-ch__card.sa-ch--revealed .sa-ch__reveal-code  { display: inline; }
.sa-ch__card.sa-ch--revealed .sa-ch__reveal-btn {
	background: #fff8dc;
	border-color: #febe00;
	border-style: solid;
	cursor: default;
}

/* Botão copiar + ir à loja */
.sa-ch__copy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 9px 12px;
	background: #febe00;
	color: #1a1a1a;
	font-size: 12px;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none !important;
	white-space: nowrap;
	flex-shrink: 0;
	transition: background 0.15s ease, color 0.15s ease;
}
.sa-ch__copy-btn:hover         { background: #e0a800; color: #1a1a1a; }
.sa-ch__copy-btn.sa-ch--copied { background: #2ecc71; color: #fff; pointer-events: none; }

/* Botão promoção sem código */
.sa-ch__promo-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 10px;
	background: #febe00;
	color: #1a1a1a;
	font-size: 13px;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none !important;
	transition: background 0.15s ease;
}
.sa-ch__promo-btn:hover { background: #e0a800; color: #1a1a1a; }

/* ── Grade usada na página de cupons ──
   Mobile: 1 coluna | Desktop (768px+): 2 colunas
── */
.sa-ch__grid-page {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;          /* espaçamento entre cards */
	padding: 20px;
	max-width: 1200px;
	margin: 0 auto;
}
@media (min-width: 768px) { .sa-ch__grid-page { grid-template-columns: repeat(2, 1fr); } }

/* ── Grade usada na home (cupons-recentes.php) ── */
.sa-ch__grid-home {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	padding: 0 20px;
	max-width: 1200px;
	margin: 0 auto;
}
@media (min-width: 600px) { .sa-ch__grid-home { grid-template-columns: repeat(2, 1fr); } }

/* ── Cabeçalho de seção (usado em ambos) ── */
.sa-ch__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	padding: 32px 20px 16px;
	max-width: 1200px;
	margin: 0 auto;
}
.sa-ch__header h2.sa-ch__header-title {
	font-size: 18px;
	font-weight: 800;
	color: #1a1a1a;
	margin: 0 0 4px;
	line-height: 1.2;
}
.sa-ch__header-sub {
	font-size: 13px;
	color: #666;
	margin: 0;
}
.sa-ch__ver-mais {
	font-size: 13px;
	font-weight: 700;
	color: #e0a800;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}
.sa-ch__ver-mais:hover { text-decoration: underline; }

/* ── Mobile ── */
@media (max-width: 599px) {
	.sa-ch__header   { flex-direction: column; align-items: flex-start; padding: 20px 14px 12px; }
	.sa-ch__grid-home,
	.sa-ch__grid-page { padding: 0 14px; }
	.sa-ch__actions  { flex-direction: column; }
	.sa-ch__copy-btn { justify-content: center; }
}


/* ── Paginação da página de cupons ── */
.pagination,
.sa-ch__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 28px 20px 36px;
	flex-wrap: wrap;
}

.pagination a,
.pagination span,
.sa-ch__pagination a,
.sa-ch__pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
	color: #1a1a1a !important;
	background: #f4f4f4;
	border: 1px solid #e5e5e5;
	transition: background 0.15s ease, border-color 0.15s ease;
	cursor: pointer;
}

.pagination a:hover,
.sa-ch__pagination a:hover {
	background: #fff8dc;
	border-color: #febe00;
	color: #1a1a1a !important;
	text-decoration: none !important;
}

.pagination .current,
.sa-ch__pagination .current {
	background: #febe00;
	border-color: #febe00;
	color: #1a1a1a !important;
	cursor: default;
}

/* dots (...) */
.pagination .dots,
.sa-ch__pagination .dots {
	background: transparent;
	border-color: transparent;
	cursor: default;
}

/* ── Acessibilidade ── */
.sa-ch__reveal-btn:focus-visible,
.sa-ch__copy-btn:focus-visible,
.sa-ch__promo-btn:focus-visible {
	outline: 3px solid #febe00;
	outline-offset: 2px;
}