/**
 * Black Friday hero and catalog blocks.
 * Loaded only on pages carrying blocks/block-bf-hero.php or block-bf-catalog.php.
 * Gold #cea445 and focus #4b7aa6 match css/styles.less.
 */

.ww-bf {
	--ww-bf-gold: #cea445;
	padding: 40px 0;
}


/* ------------------------------------------------------------------
   Hero — blocks/block-bf-hero.php
   Photo background with a dark wash, copy on the left, signup card on the
   right. Card markup comes from ww_bf_render_hero_card() and is swapped in
   place after the unlock, so every state is styled here.
   ------------------------------------------------------------------ */

#main-content .ww-bf-hero {
	--ww-bf-gold: #cea445;
	position: relative;
	color: #fff;
	background: #1c1c1c var(--bf-hero-bg) center center / cover no-repeat;
}

/* The theme colours p, li, strong and headings sitewide; everything in the
   copy column and the review strip is white on the photo. The photo carries
   its own darkening, so there is no overlay here. */
#main-content .ww-bf-hero__copy,
#main-content .ww-bf-hero__copy p,
#main-content .ww-bf-hero__copy li,
#main-content .ww-bf-hero__copy strong,
#main-content .ww-bf-hero__copy span,
#main-content .ww-bf-hero__heading,
#main-content .ww-bf-hero__ends,
#main-content .ww-bf-hero__reviews,
#main-content .ww-bf-hero__reviews strong {
	color: #fff !important;
}

#main-content .ww-bf-hero__subheading,
#main-content .ww-bf-hero__stars {
	color: var(--ww-bf-gold) !important;
}

.ww-bf-hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(300px, 420px);
	gap: 40px;
	align-items: center;
	padding-top: 56px;
	padding-bottom: 56px;
}

.ww-bf-hero__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 28px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(29, 53, 87, 0.9);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ww-bf-hero__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9fc5ff;
}

.ww-bf-hero__heading {
	margin: 0;
	color: #fff;
	font-size: 48px;
	line-height: 1.1;
}

.ww-bf-hero__subheading {
	margin: 4px 0 18px;
	color: var(--ww-bf-gold);
	font-family: "Baskervville", serif !important;
	font-size: 44px;
	line-height: 1.1;
	font-weight: 400;
}

.ww-bf-hero__ends {
	margin: 0 0 32px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ww-bf-hero__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 18px 36px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ww-bf-hero__badge {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	line-height: 1.3;
}

.ww-bf-hero__badge-icon {
	width: 36px;
	height: 36px;
	flex: 0 0 auto;
}

.ww-bf-hero__badge-copy {
	display: flex;
	flex-direction: column;
}

.ww-bf-hero__badge-copy strong {
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Card */

.ww-bf-hero__card {
	padding: 28px 28px 22px;
	border-radius: 6px;
	background: #f8f6f1;
	color: #222;
	text-align: center;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

.ww-bf-hero__lock,
.ww-bf-hero__check {
	display: block;
	margin: 0 auto 10px;
	color: #222;
}

.ww-bf-hero__check {
	color: #4c7a3a;
}

.ww-bf-hero__card-title {
	margin: 0 0 6px;
	color: #222;
	font-size: 24px;
	line-height: 1.2;
}

.ww-bf-hero__card-subtitle {
	margin: 0 0 18px;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ww-bf-hero__card-subtitle--global {
	margin-top: 18px;
}

.ww-bf-hero__card-text {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.5;
}

.ww-bf-hero__form {
	text-align: left;
}

/* Gravity Form inside the hero card */

.ww-bf-hero__form .gform_wrapper,
.ww-bf-hero__form .gform_wrapper form {
	margin: 0;
}

.ww-bf-hero__form .gfield_label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
}

.ww-bf-hero__form .gfield input:not([type="checkbox"]):not([type="radio"]) {
	display: block;
	width: 100%;
	padding: 11px 14px;
	border: 1px solid #cfc9bd;
	border-radius: 4px;
	background: #fff;
	color: #222;
	font-size: 15px;
}

.ww-bf-hero__form .gfield input:focus-visible {
	outline: 2px solid #4b7aa6;
	outline-offset: 1px;
}

.ww-bf-hero__button {
	display: block;
	width: 100%;
	margin: 14px 0 0;
	border: 0;
	border-radius: 4px;
	box-shadow: none !important;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}

.ww-bf-hero__form .gform_footer {
	margin: 0;
	padding: 0;
}

.ww-bf-hero__form .gfield_validation_message,
.ww-bf-hero__form .gform_validation_errors {
	margin: 10px 0 0;
	color: #a12d2d;
	font-size: 14px;
	line-height: 1.4;
}

.ww-bf-hero__form .gform_confirmation_message {
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

.ww-bf-hero__consent {
	margin: 12px 0 0;
	color: #666;
	font-size: 11px;
	line-height: 1.5;
	text-align: center;
}

/* Review strip */

.ww-bf-hero__reviews {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 18px;
	font-size: 14px;
}

.ww-bf-hero__avatars {
	display: flex;
}

.ww-bf-hero__avatars img {
	width: 32px;
	height: 32px;
	margin-left: -8px;
	border: 2px solid #fff;
	border-radius: 50%;
	object-fit: cover;
}

.ww-bf-hero__avatars img:first-child {
	margin-left: 0;
}

.ww-bf-hero__reviews-copy {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.ww-bf-hero__stars {
	color: var(--ww-bf-gold);
	font-size: 13px;
}

@media screen and (max-width: 960px) {
	.ww-bf-hero__inner {
		grid-template-columns: 1fr;
		gap: 28px;
		padding-top: 40px;
		padding-bottom: 40px;
	}

	.ww-bf-hero__heading,
	.ww-bf-hero__subheading {
		font-size: 36px;
	}
}

@media screen and (max-width: 639px) {
	#main-content .ww-bf-hero {
		background-image: var(--bf-hero-bg-mobile);
	}

	.ww-bf-hero__heading,
	.ww-bf-hero__subheading {
		font-size: 30px;
	}

	.ww-bf-hero__card {
		padding: 22px 18px 18px;
	}
}

/* ------------------------------------------------------------------
   Deal tiles — follow the Product Grid card look from the mockup:
   rounded photo, serif name beneath, no card chrome. The black bar is the
   tile's foot while locked; the gold badge and "From" price replace it once
   unlocked.
   ------------------------------------------------------------------ */

/* Scoped to the page wrapper and marked important: the theme's global h2/h3
   rules (left-aligned, coloured, backgrounded) have higher specificity than
   a lone class and were winning. */
#main-content .ww-bf__header {
	text-align: center !important;
	margin: 0 0 40px !important;
}

#main-content .ww-bf__title {
	margin: 0 0 10px !important;
	padding: 0 !important;
	font-family: "Baskervville", serif !important;
	font-size: 3.6rem !important;
	font-weight: 400 !important;
	line-height: 1.15 !important;
	text-align: center !important;
	color: #333 !important;
	background: none !important;
}

#main-content .ww-bf__subtitle {
	margin: 0 !important;
	font-size: 1.7rem !important;
	line-height: 1.5 !important;
	text-align: center !important;
	color: #555 !important;
}

.ww-bf__deals {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 28px;
}

.ww-bf__card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	color: inherit;
}

/* The link wraps photo, name and deal; the cover bar sits outside it so a
   click on the bar never navigates. */
.ww-bf__card-link {
	position: relative;
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

a.ww-bf__card-link:hover,
a.ww-bf__card-link:focus-visible {
	color: inherit;
	text-decoration: none;
}

a.ww-bf__card-link:hover .ww-bf__card-image img,
a.ww-bf__card-link:focus-visible .ww-bf__card-image img {
	box-shadow: inset 0 0 0 1px #e5e5e5, 0 8px 22px rgba(0, 0, 0, 0.12);
}

a.ww-bf__card-link:focus-visible {
	outline: 2px solid #4b7aa6;
	outline-offset: 4px;
	border-radius: 6px;
}

/* Source photos vary in aspect ratio; crop them to one shape so the grid reads
   as a set rather than a ransom note. */
.ww-bf__card-image {
	overflow: hidden;
	border-radius: 6px;
	background: #f7f7f7;
}

.ww-bf__card-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 6px;
	transition: box-shadow 0.2s ease;
}

.ww-bf__card-body {
	flex: 1 0 auto;
	padding: 16px 0 10px;
}

#main-content .ww-bf__card-title {
	margin: 0 !important;
	padding: 0 !important;
	font-family: "Baskervville", serif !important;
	font-size: 2.2rem !important;
	font-weight: 400 !important;
	line-height: 1.2 !important;
	text-align: left !important;
	color: #333 !important;
	background: none !important;
}

.ww-bf__eyebrow {
	margin: 8px 0 0;
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #666;
}

.ww-bf__copy {
	margin: 6px 0 0;
	font-size: 1.5rem;
	line-height: 1.5;
	color: #555;
}

.ww-bf__card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 10px 0 0;
	font-size: 1.4rem;
	color: #333;
}

.ww-bf__coupon strong {
	color: #333;
}

.ww-bf__cta {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ------------------------------------------------------------------
   The strip under each tile's name. Locked: a black "Sign up to see
   discounts" button that jumps to the hero email field. Unlocked: the same
   black strip carrying the saving in gold and the "From" price. Forced over
   the theme's global button and paragraph rules.
   ------------------------------------------------------------------ */

#main-content .ww-bf__bar,
#main-content .ww-bf__deal {
	display: flex !important;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px 14px;
	width: 100%;
	min-height: 42px;
	margin: 4px 0 0 !important;
	padding: 10px 16px !important;
	border: 0 !important;
	border-radius: 3px !important;
	background: #111 !important;
	color: #fff !important;
	font-family: "Open Sans", sans-serif !important;
	font-size: 1.3rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.05em !important;
	line-height: 1.3 !important;
	text-transform: uppercase !important;
	text-align: center !important;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background 0.2s ease, opacity 0.3s ease;
}

#main-content .ww-bf__bar {
	cursor: pointer;
}

#main-content .ww-bf__bar svg {
	flex: 0 0 auto;
	color: #fff;
}

#main-content .ww-bf__bar:hover,
#main-content .ww-bf__bar:focus-visible {
	background: #000 !important;
	color: #fff !important;
}

#main-content .ww-bf__bar:focus-visible {
	outline: 2px solid #4b7aa6 !important;
	outline-offset: -4px;
}

#main-content .ww-bf__card.is-revealing .ww-bf__bar {
	opacity: 0;
	pointer-events: none;
}

#main-content .ww-bf__deal-save {
	color: var(--ww-bf-gold) !important;
	font-size: 1.5rem !important;
}

#main-content .ww-bf__deal-price,
#main-content .ww-bf__deal-price .woocommerce-Price-amount,
#main-content .ww-bf__deal-price bdi {
	color: #fff !important;
	font-weight: 600 !important;
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */

@media screen and (max-width: 960px) {
	.ww-bf__deals {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 639px) {
	.ww-bf__deals {
		grid-template-columns: 1fr;
		gap: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#main-content .ww-bf__bar {
		transition: none;
	}
}
