/**
 * Public site: home, search, coupons, header/footer, newsletter.
 * Load after fixes.css (design tokens + utilities).
 */

/* --- FORMS & SPAM PROTECTION (newsletter honeypot) --- */
.nl-hp-field {
	position: absolute;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* --- HERO (home) --- */
.hero-min-h { height: 444px; max-height: 444px; min-height: 444px; }
.hero-home-bg {
	background-image: url(../images/home-hero-bg.svg);
	background-position: center center;
	background-size: 100%;
}

/* --- HOME: LATEST COUPONS (3-col desktop, 1-col mobile) --- */
.latest-coupons-section { padding: 28px 0 8px; }
.latest-coupons-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	align-items: stretch;
}
@media (max-width: 768px) {
	.latest-coupons-grid { grid-template-columns: 1fr; }
}

/* --- COUPON CARD (shared across home, search, listings) --- */
.latest-coupon-card {
	background: var(--bg-white);
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.latest-coupon-card__offer {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 100px;
	padding: 10px;
	box-sizing: border-box;
	background: var(    --bg-primary);
	text-align: center;
}
.latest-coupon-card__meta svg { color: var(--text-secondary); }
.latest-coupon-card__discount {
	display: block;
	width: 100%;
	font-size: 28px;
	font-weight: var(--font-weight-700);
	color: var(--text-white);
}
.latest-coupon-card__inner {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
	min-height: 0;
}
.latest-coupon-card__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.latest-coupon-card__logo {
	width: 56px; height: 56px;
	border-radius: 10px;
	object-fit: contain;
	background: var(--bg-grey);
	flex-shrink: 0;
}
.latest-coupon-card__logo--placeholder {
	object-fit: cover;
	background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
}
.latest-coupon-card__title {
	margin: 0;
	flex: 1; min-width: 0;
	font-size: 16px;
	font-weight: var(--font-weight-600);
	color: var(--text-black);
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.latest-coupon-card__progress-wrap { width: 100%; box-sizing: border-box; }
.latest-coupon-card__progress {
	height: 10px;
	border-radius: 999px;
	background: var(--bg-grey);
	overflow: hidden;
}
.latest-coupon-card__progress-bar {
	height: 100%;
	width: 0%;
	border-radius: inherit;
	background: var(--button-primary);
	transition: width 0.35s ease;
}
.latest-coupon-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 13px;
	color: var(--text-secondary);
}
.latest-coupon-card__meta-item { display: flex; align-items: center; gap: 6px; min-width: 0; }

/* Dashboard list cards: logo + stacked title / business */
.latest-coupon-card__brand--dash { align-items: center; }
.latest-coupon-card__brand-stack {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	flex: 1;
	min-width: 0;
}
.latest-coupon-card__biz-line {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-secondary);
	line-height: 1.35;
	max-width: 100%;
}
.latest-coupon-card__brand--dash .latest-coupon-card__title {
	flex: none;
	width: 100%;
}
.latest-coupon-card__dash-date {
	font-size: 13px;
	color: var(--text-secondary);
	margin: 0;
	line-height: 1.4;
}
.latest-coupon-card__code-row {
	display: flex;
	align-items: stretch;
	gap: 10px;
	width: 100%;
	margin-top: 4px;
}
.latest-coupon-card__code-box {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--border-menu, #e8ecf0);
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 15px;
	font-weight: 600;
	color: var(--text-primary);
	line-height: 1.3;
	word-break: break-word;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	background: var(--bg-white);
}
.latest-coupon-card__code-copy {
	flex-shrink: 0;
	min-width: 44px;
	border: 1px solid var(--border-menu, #e8ecf0);
	border-radius: 8px;
	background: var(--bg-white);
	color: var(--text-primary);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	transition: background 0.15s ease;
}
.latest-coupon-card__code-copy:hover { background: var(--bg-grey); }
.latest-coupon-card__code-hint {
	font-size: 13px;
	color: var(--text-secondary);
	margin: 0;
	font-style: italic;
	line-height: 1.4;
}
.latest-coupon-card__biz-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--border-menu, #e8ecf0);
}

/* --- AUTH FORMS --- */
.auth-form .block-field { width: 100%; box-sizing: border-box; }
.auth-submit { width: 100%; cursor: pointer; }

/* --- COUPON GRID (listing pages) --- */
.coupon-grid-responsive {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
	.coupon-grid-responsive { grid-template-columns: 1fr; }
}

/* --- SEARCH (hero + dedicated page) --- */
.hero-search-input { width: 100%; max-width: 600px; box-sizing: border-box; }

/* --- HOME SECTIONS & FOOTER --- */
.featured-coupon,
.last-coupon { padding: 2rem 0; }
.featured-container,
.last-container { padding: 0.5rem 0; }
.poupon-list {
	padding: 1rem;
	border: 1px solid var(--border-menu, #f0f3f5);
	border-radius: 0.375rem;
	background: var(--bg-white, #fff);
}
.footer-container { padding: 1rem 0; }

/* --- COUPON TICKET CUTOUT (decorative holes + dashed border) --- */
.coupon-lines-ball {
	position: relative;
	height: 0;
	border: 2px solid transparent;
	border-image: repeating-linear-gradient(
		to right,
		#02643c 0 10px,
		transparent 10px 20px
	) 1;
}
.coupon-lines-ball::before,
.coupon-lines-ball::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 20px; height: 20px;
	background: #f0f2f8;
	border-radius: 50%;
	transform: translateY(-50%);
	z-index: 99;
}
.coupon-lines-ball::before { left: -10px; }
.coupon-lines-ball::after  { right: -10px; }

/* --- PUBLIC TOASTS (auth redirects and feedback) --- */
.auth-toast {
	position: relative;
	margin: 0 0 10px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.4;
	font-weight: 600;
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.auth-toast.is-leaving { opacity: 0; transform: translateY(-6px); }
.auth-toast--success { background: #ecfdf3; color: #065f46; border-color: #a7f3d0; }


.latest-coupon-card:hover .view-coupons {
    background: var(--button-primary);
    color: var(--text-white);
}