/* Special Offers page — [hhd_special_offers] shortcode */

/* ── Page wrapper spacing reset ──────────────────────────────────────────────
   Blocksy adds 60px padding via data-vertical-spacing on the ct-container-full
   wrapping this page. Gutenberg adds 1.5em margin-block-end on the shortcode
   root div. Zero both for consistent header/footer spacing. */
[class*="ct-container"][data-vertical-spacing] {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.entry-content > .hhd-offers-wrap {
	margin-block-end: 0;
}

/* ── Wrapper ────────────────────────────────────────────────────────────────── */

.hhd-offers-wrap {
	max-width: 1290px;
	margin: 0 auto;
	padding: 0 0 0;
}

/* Override the catalog-hero gradient for the offers page accent */
.hhd-offers-hero::after {
	background: linear-gradient(90deg, var(--hhd-accent-color, #0a6e3f) 0%, #092f64 100%);
}

/* ── Toolbar ────────────────────────────────────────────────────────────────── */

.hhd-offers-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin: 22px 0 12px;
}

.hhd-offers-toolbar__left {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.hhd-offers-toolbar__right {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.hhd-offers-count {
	font-size: 14px;
	color: var(--hhd-muted, #5e6b7d);
}

.hhd-offers-loading {
	font-size: 13px;
	color: var(--hhd-green, #67b900);
	font-style: italic;
}

/* Deal pills */

.hhd-offers-deal-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.hhd-offers-deal-pill {
	display: inline-flex;
	align-items: center;
	height: 34px;
	padding: 0 14px;
	border: 1px solid var(--hhd-border, #e4e9ef);
	border-radius: 17px;
	background: #fff;
	color: var(--hhd-ink, #061b3a);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.hhd-offers-deal-pill:hover {
	border-color: var(--hhd-blue, #002b66);
	color: var(--hhd-blue, #002b66);
}

.hhd-offers-deal-pill[aria-pressed="true"] {
	background: var(--hhd-blue, #002b66);
	border-color: var(--hhd-blue, #002b66);
	color: #fff;
}

/* ── Active filter tags ─────────────────────────────────────────────────────── */

.hhd-offers-active-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 14px;
}

.hhd-offers-tag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 28px;
	padding: 0 10px 0 12px;
	border: 1px solid var(--hhd-border, #e4e9ef);
	border-radius: 14px;
	background: #f0f4f8;
	font-size: 13px;
	font-weight: 600;
	color: var(--hhd-ink, #061b3a);
}

.hhd-offers-tag-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c8d2dc;
	color: var(--hhd-ink, #061b3a);
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

.hhd-offers-tag-remove:hover {
	background: var(--hhd-red, #b91924);
	color: #fff;
}

.hhd-offers-clear-link {
	font-size: 13px;
	font-weight: 600;
	color: var(--hhd-blue, #002b66);
	text-decoration: underline;
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
}

/* ── Grid / empty state ─────────────────────────────────────────────────────── */

.hhd-offers-empty-state {
	text-align: center;
	padding: 56px 24px;
	color: var(--hhd-muted, #5e6b7d);
}

.hhd-offers-empty-state p {
	font-size: 1.05rem;
	margin: 0;
}

.hhd-offers-empty {
	text-align: center;
	padding: 64px 24px;
	color: var(--hhd-muted, #5e6b7d);
}

.hhd-offers-empty p {
	font-size: 1.1rem;
	margin-bottom: 24px;
}

/* ── Product image thumbnails — square, consistent size ─────────────────────── */

#hhd-offers-grid .ct-media-container {
	aspect-ratio: 1;
	overflow: hidden;
}

#hhd-offers-grid .ct-media-container img.ct-swap {
	display: none;
}

#hhd-offers-grid .ct-media-container img.wp-post-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* ── Off-canvas filter panel ────────────────────────────────────────────────── */

/* Backdrop — created by JS but styled here for ease */
.hhd-offers-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.38);
	z-index: 9998;
}

.hhd-offers-panel {
	position: fixed;
	top: 0;
	left: 0;
	height: 100%;
	width: 320px;
	max-width: 90vw;
	background: #fff;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	box-shadow: 4px 0 24px rgba(0, 0, 0, 0.14);
	transform: translateX(-100%);
	transition: transform 0.26s ease;
	overflow: hidden;
}

.hhd-offers-panel.is-open {
	transform: translateX(0);
}

.hhd-offers-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px 16px;
	border-bottom: 1px solid var(--hhd-border, #e4e9ef);
	flex-shrink: 0;
}

.hhd-offers-panel__title {
	font-size: 18px;
	font-weight: 800;
	margin: 0;
	color: var(--hhd-ink, #061b3a);
}

.hhd-offers-panel__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--hhd-border, #e4e9ef);
	border-radius: 50%;
	background: #fff;
	color: var(--hhd-ink, #061b3a);
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.hhd-offers-panel__close:hover {
	background: #f0f4f8;
	border-color: #c0cbd8;
}

.hhd-offers-panel__body {
	flex: 1;
	overflow-y: auto;
	padding: 0 20px;
	-webkit-overflow-scrolling: touch;
}

.hhd-offers-panel__foot {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 16px 20px;
	border-top: 1px solid var(--hhd-border, #e4e9ef);
	flex-shrink: 0;
}

.hhd-offers-panel__foot .hhd-filter-clear-all {
	flex: 0 0 auto;
}

.hhd-offers-panel__foot .hhd-filter-apply {
	flex: 1;
}

/* Hierarchical layout — parent label sits on its own row, children indent below */
.hhd-filter-item--has-children {
	flex-wrap: wrap;
}

/* label has width:100% from catalog.css, which forces the child ul to the next row */
.hhd-filter-item--has-children > .hhd-filter-label {
	font-weight: 700;
}

.hhd-filter-children {
	width: 100%;
	margin: 0 0 6px 20px;
	padding: 0;
	list-style: none;
}

/* ── SEO copy section ───────────────────────────────────────────────────────── */
/* --hhd-content-width is defined on .hhd-catalog-shell, not available here; set directly */
.hhd-offers-wrap .hhd-seo-copy__inner {
	max-width: 1290px;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
	.hhd-offers-wrap {
		padding: 0;
	}

	.hhd-offers-toolbar {
		flex-wrap: wrap;
		gap: 10px;
		margin: 16px 0 10px;
	}

	.hhd-offers-toolbar__left {
		flex: 1 1 100%;
		justify-content: space-between;
	}

	.hhd-offers-toolbar__right {
		flex: 1 1 100%;
		justify-content: flex-start;
	}

	.hhd-filter-trigger {
		flex: 1;
		justify-content: center;
	}

	.hhd-offers-panel {
		width: 100%;
		max-width: 100%;
	}
}

@media (max-width: 480px) {
	.hhd-offers-deal-pills {
		width: 100%;
		overflow-x: auto;
		flex-wrap: nowrap;
		scrollbar-width: none;
		padding-bottom: 2px;
	}

	.hhd-offers-deal-pills::-webkit-scrollbar {
		display: none;
	}
}
