/**
 * Eternity Diamonds Homepage Styles
 * 
 * Custom CSS for the Eternity Diamonds homepage.
 * Only loaded on the front page (is_front_page()).
 * 
 * Brand Colors:
 * - Primary Navy: #0D2A4D
 * - Warm Tan: #C99A73
 * - Dark Text: #1B1B1B
 * - Deep Navy: #10243D
 * - Light Beige: #F8F5F1
 * - Soft Grey: #F2F2F2
 * - White: #FFFFFF
 * - Border: #E6E6E6
 * 
 * Typography:
 * - Headings: Georgia
 * - Body/Nav: Helvetica
 */

/* ============================================
   ROOT & UTILITY STYLES
   ============================================ */

:root {
	--eternity-navy: #0D2A4D;
	--eternity-navy-deep: #10243D;
	--eternity-tan: #C99A73;
	--eternity-text: #1B1B1B;
	--eternity-beige: #F8F5F1;
	--eternity-grey: #F2F2F2;
	--eternity-white: #FFFFFF;
	--eternity-border: #E6E6E6;
}

/**
 * BLOCKSY CONTENT WRAPPER RESET
 * 
 * When content is injected via the_content filter, Blocksy wraps it in a
 * constrained page content container with max-width, padding, and width restrictions.
 * 
 * On the homepage, we override those constraints to allow full-width sections
 * while keeping inner content readable via max-width inner containers.
 * 
 * This is scoped to .eternity-homepage-template body class and targets ONLY
 * the top-level page content wrapper (article.page > .entry-content), not nested
 * elements or future WooCommerce products that may use <article> tags.
 */

/* Reset top-level page content wrapper constraints on homepage only */
.eternity-homepage-template article.page > .entry-content {
	max-width: none;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}

/* Homepage wrapper fills available width */
.eternity-homepage {
	font-family: 'Helvetica', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--eternity-text);
	line-height: 1.6;
	width: 100%;
}

/* Container divides sections */
.eternity-homepage__container {
	width: 100%;
}

.eternity-section__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 20px;
	width: 100%;
	box-sizing: border-box;
}

.eternity-section__header {
	text-align: center;
	margin-bottom: 50px;
}

.eternity-section__title {
	font-family: 'Georgia', serif;
	font-size: 42px;
	font-weight: normal;
	letter-spacing: -0.5px;
	margin: 0 0 20px 0;
	color: var(--eternity-navy-deep);
}

.eternity-section__description {
	font-size: 18px;
	color: #666;
	max-width: 600px;
	margin: 0 auto;
	font-weight: 300;
	line-height: 1.6;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.eternity-btn {
	display: inline-block;
	padding: 14px 32px;
	font-family: 'Helvetica', sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-decoration: none;
	text-transform: uppercase;
	transition: all 0.3s ease;
	border: 2px solid transparent;
	cursor: pointer;
	border-radius: 0;
}

.eternity-btn--primary {
	background-color: var(--eternity-navy);
	color: var(--eternity-white);
	border-color: var(--eternity-navy);
}

.eternity-btn--primary:hover {
	background-color: var(--eternity-navy-deep);
	border-color: var(--eternity-navy-deep);
}

.eternity-btn--secondary {
	background-color: var(--eternity-tan);
	color: var(--eternity-white);
	border-color: var(--eternity-tan);
}

.eternity-btn--secondary:hover {
	background-color: #b8894a;
	border-color: #b8894a;
}

.eternity-btn--tertiary {
	background-color: transparent;
	color: var(--eternity-navy);
	border-color: var(--eternity-navy);
}

.eternity-btn--tertiary:hover {
	background-color: var(--eternity-navy);
	color: var(--eternity-white);
}

/* ============================================
   PLACEHOLDER STYLES
   ============================================ */

.eternity-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #F8F5F1 0%, #F2F2F2 100%);
	border: 2px dashed var(--eternity-border);
	padding: 40px 20px;
	box-sizing: border-box;
	text-align: center;
	min-height: 300px;
}

.eternity-placeholder--hero {
	min-height: 400px;
}

.eternity-placeholder--product {
	min-height: 350px;
}

.eternity-placeholder--category {
	min-height: 280px;
}

.eternity-placeholder--appointment {
	min-height: 350px;
}

.eternity-placeholder__label {
	display: block;
	font-family: 'Georgia', serif;
	font-size: 18px;
	font-weight: 600;
	color: var(--eternity-navy);
	margin-bottom: 10px;
}

.eternity-placeholder__description {
	font-size: 14px;
	color: #999;
	margin: 0;
	font-style: italic;
}

/* ============================================
   HERO SECTION
   ============================================ */

.eternity-homepage__hero {
	background: var(--eternity-white);
	padding: 30px 0 80px;
	width: 100%;
}

.eternity-hero__content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
}

.eternity-hero__heading {
	font-family: 'Georgia', serif;
	font-size: 55px;
	font-weight: normal;
	line-height: 1.2;
	margin: 0 0 25px 0;
	color: var(--eternity-navy-deep);
	letter-spacing: -0.5px;
}

.eternity-hero__subheading {
	font-size: 18px;
	color: #666;
	margin: 0 0 40px 0;
	line-height: 1.7;
	max-width: 500px;
	font-weight: 300;
}

.eternity-hero__ctas {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.eternity-hero__ctas .eternity-btn {
	flex-shrink: 0;
}

.eternity-hero__photo {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 400px;
	object-fit: cover;
}

/* ============================================
   ENGAGEMENT RINGS SECTION
   ============================================ */

.eternity-homepage__engagement-rings {
	background: var(--eternity-beige);
	padding: 60px 0;
	width: 100%;
}

.eternity-engagement-rings__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 50px;
}

.eternity-engagement-rings__card {
	background: var(--eternity-white);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.eternity-engagement-rings__image {
	width: 100%;
	aspect-ratio: 4/5;
	overflow: hidden;
}

.eternity-engagement-rings__photo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.eternity-engagement-rings__content {
	padding: 40px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.eternity-engagement-rings__heading {
	font-family: 'Georgia', serif;
	font-size: 30px;
	font-weight: normal;
	margin: 0 0 15px 0;
	color: var(--eternity-navy-deep);
}

.eternity-engagement-rings__text {
	font-size: 16px;
	color: #666;
	margin: 0 0 30px 0;
	flex-grow: 1;
	line-height: 1.7;
}

/* ============================================
   WEDDING BANDS SECTION
   ============================================ */

.eternity-homepage__wedding-bands {
	background: var(--eternity-white);
	padding: 60px 0;
	width: 100%;
}

.eternity-wedding-bands__subsection {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
	width: 100%;
	margin-bottom: 60px;
}

.eternity-wedding-bands__subsection:last-child {
	margin-bottom: 0;
}

.eternity-wedding-bands__subtitle {
	font-family: 'Georgia', serif;
	font-size: 30px;
	font-weight: normal;
	color: var(--eternity-navy-deep);
	margin: 0 0 40px 0;
	text-align: center;
}

.eternity-wedding-bands__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

.eternity-wedding-bands__card {
	text-align: center;
}

.eternity-wedding-bands__image {
	width: 100%;
	aspect-ratio: 1;
	margin-bottom: 20px;
}

.eternity-wedding-bands__photo {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	object-fit: cover;
	object-position: center;
}

.eternity-wedding-bands__photo--mens {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	object-fit: cover;
	object-position: center;
}

.eternity-wedding-bands__label {
	font-size: 16px;
	font-weight: 600;
	color: var(--eternity-navy);
	margin-bottom: 20px;
}

/* ============================================
   JEWELLERY SECTION
   ============================================ */

.eternity-homepage__jewellery {
	background: var(--eternity-beige);
	padding: 60px 0;
	width: 100%;
}

.eternity-jewellery__grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 25px;
}

.eternity-jewellery__card {
	text-align: center;
	min-width: 0;
}

.eternity-jewellery__image {
	width: 100%;
	aspect-ratio: 4 / 5;
	height: 280px;
	margin-bottom: 20px;
}

.eternity-jewellery__photo {
	display: block;
	width: 100%;
	height: 280px;
	object-fit: cover;
	object-position: center;
}

.eternity-jewellery__label {
	font-size: 16px;
	font-weight: 600;
	color: var(--eternity-navy);
	margin-bottom: 20px;
}

/* ============================================
   DIAMOND CHOICE SECTION
   ============================================ */

.eternity-homepage__diamond-choice {
	background: var(--eternity-white);
	padding: 60px 0;
	width: 100%;
}

.eternity-diamond-choice__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	margin-bottom: 40px;
}

.eternity-diamond-choice__column {
	padding: 40px;
	background: var(--eternity-grey);
	border: 1px solid var(--eternity-border);
	min-width: 0;
}

.eternity-diamond-choice__heading {
	font-family: 'Georgia', serif;
	font-size: 28px;
	font-weight: normal;
	color: var(--eternity-navy-deep);
	margin: 0 0 20px 0;
}

.eternity-diamond-choice__text {
	font-size: 16px;
	color: #666;
	margin: 0 0 25px 0;
	line-height: 1.8;
}

.eternity-diamond-choice__list {
	list-style: none;
	padding: 0;
	margin: 0 0 30px 0;
}

.eternity-diamond-choice__list li {
	font-size: 15px;
	color: var(--eternity-navy);
	padding-left: 25px;
	margin-bottom: 12px;
	position: relative;
}

.eternity-diamond-choice__list li:before {
	content: '◆';
	position: absolute;
	left: 0;
	color: var(--eternity-tan);
}

.eternity-diamond-choice__disclaimer {
	text-align: center;
	font-size: 14px;
	color: #999;
	max-width: 600px;
	margin: 0 auto;
	font-style: italic;
	padding: 0 20px;
}

/* ============================================
   WHY ETERNITY SECTION
   ============================================ */

.eternity-homepage__why-eternity {
	background: var(--eternity-beige);
	padding: 60px 0;
	width: 100%;
}

.eternity-why-eternity__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
}

.eternity-why-eternity__card {
	text-align: center;
	padding: 30px;
	min-width: 0;
}

.eternity-why-eternity__icon {
	font-size: 40px;
	line-height: 1;
	margin-bottom: 20px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.eternity-why-eternity__icon-placeholder {
	color: var(--eternity-tan);
	font-size: 48px;
}

.eternity-why-eternity__heading {
	font-family: 'Georgia', serif;
	font-size: 20px;
	font-weight: normal;
	color: var(--eternity-navy-deep);
	margin: 0 0 15px 0;
}

.eternity-why-eternity__text {
	font-size: 15px;
	color: #666;
	margin: 0;
	line-height: 1.7;
}

/* ============================================
   FEATURED PRODUCTS SECTION
   ============================================ */

.eternity-homepage__featured-products {
	background: var(--eternity-white);
	padding: 60px 0;
	width: 100%;
}

.eternity-featured-products__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
}

.eternity-featured-products__card {
	display: flex;
	flex-direction: column;
	background: var(--eternity-white);
	min-width: 0;
}

.eternity-featured-products__image {
	width: 100%;
	aspect-ratio: 3/4;
	margin-bottom: 20px;
	overflow: hidden;
	background-color: var(--eternity-white);
}

/* Real rendered markup for this section (confirmed from live DOM inspection --
   there is no <figure> or .ct-media-container wrapper here, unlike Product Archives):
     .eternity-featured-products__image[--has-hover]
       > a
         > img (WooCommerce thumbnail -- main image)
         > img.eternity-featured-products__hover-image (only when the product has a
           gallery image)
   Fills the fixed-ratio box above without cropping, so all 4 cards line up even
   though the source images have different amounts of white space. */
.eternity-featured-products__image a {
	display: block;
	width: 100%;
	height: 100%;
}

.eternity-featured-products__image > a > img:not(.eternity-featured-products__hover-image) {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

/* Second-image hover swap, scoped to cards whose product has a gallery image
   (--has-hover modifier). Both images are positioned absolutely against the same
   <a> canvas so they occupy identical pixels -- the earlier "visible strip" bug was
   caused by the main image being sized independently instead of sharing this canvas. */
.eternity-featured-products__image--has-hover > a {
	position: relative;
}

.eternity-featured-products__image--has-hover > a > img:not(.eternity-featured-products__hover-image) {
	position: absolute;
	inset: 0;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.eternity-featured-products__image--has-hover > a > .eternity-featured-products__hover-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* The opacity toggle only fires on devices with a real mouse, so touch/mobile never
   triggers the swap -- the hover image simply sits at opacity: 0 everywhere else. */
@media (hover: hover) and (pointer: fine) {
	.eternity-featured-products__card:hover .eternity-featured-products__image--has-hover > a > img:not(.eternity-featured-products__hover-image) {
		opacity: 0;
	}

	.eternity-featured-products__card:hover .eternity-featured-products__image--has-hover > a > .eternity-featured-products__hover-image {
		opacity: 1;
	}
}

.eternity-featured-products__content {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	text-align: center;
}

.eternity-featured-products__name {
	font-family: 'Georgia', serif;
	font-size: 18px;
	font-weight: normal;
	color: var(--eternity-navy-deep);
	margin: 0 0 10px 0;
}

.eternity-featured-products__description {
	font-size: 14px;
	color: #999;
	margin: 0 0 20px 0;
	flex-grow: 1;
}

.eternity-featured-products__footer {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 15px;
	margin-top: auto;
}

.eternity-featured-products__price {
	font-size: 16px;
	font-weight: 600;
	color: var(--eternity-navy);
}

/* Native WooCommerce Add to Cart button -- styled to match the site's existing
   tertiary CTA look (.eternity-btn--tertiary), scoped to this section only so
   it doesn't affect WooCommerce's .button class anywhere else on the site. */
.eternity-featured-products__footer .button {
	display: inline-block;
	padding: 14px 32px;
	font-family: 'Helvetica', sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-decoration: none;
	text-transform: uppercase;
	transition: all 0.3s ease;
	border: 2px solid var(--eternity-navy);
	border-radius: 0;
	background-color: transparent;
	color: var(--eternity-navy);
	cursor: pointer;
}

.eternity-featured-products__footer .button:hover {
	background-color: var(--eternity-navy);
	color: var(--eternity-white);
}

/* ============================================
   APPOINTMENT SECTION
   ============================================ */

.eternity-homepage__appointment {
	background: var(--eternity-navy-deep);
	padding: 80px 0;
	color: var(--eternity-white);
	width: 100%;
}

.eternity-appointment__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
}

.eternity-appointment__heading {
	font-family: 'Georgia', serif;
	font-size: 42px;
	font-weight: normal;
	line-height: 1.3;
	margin: 0 0 25px 0;
	color: var(--eternity-white);
}

.eternity-appointment__text {
	font-size: 18px;
	margin: 0 0 35px 0;
	line-height: 1.7;
	font-weight: 300;
}

.eternity-appointment__photo {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 350px;
	object-fit: cover;
	object-position: center;
}

/* ============================================
   REVIEWS SECTION
   ============================================ */

.eternity-homepage__reviews {
	background: var(--eternity-white);
	padding: 60px 0;
	width: 100%;
}

.eternity-reviews__grid {
	width: 100%;
}

.eternity-reviews__card {
	padding: 30px;
	background: var(--eternity-grey);
	border: 1px solid var(--eternity-border);
	min-width: 0;
}

.eternity-reviews__stars {
	margin-bottom: 20px;
}

.eternity-reviews__star-placeholder {
	color: var(--eternity-tan);
	font-size: 16px;
	letter-spacing: 2px;
}

.eternity-reviews__quote {
	margin: 0 0 20px 0;
	font-style: italic;
	color: #666;
	line-height: 1.8;
}

.eternity-reviews__quote p {
	margin: 0;
}

.eternity-reviews__author {
	font-size: 14px;
	font-weight: 600;
	color: var(--eternity-navy);
	margin: 0;
}

/* ============================================
   BRAND CLOSING SECTION
   ============================================ */

.eternity-homepage__brand-closing {
	background: var(--eternity-beige);
	padding: 80px 0;
	width: 100%;
}

.eternity-brand-closing__content-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
}

.eternity-brand-closing__text {
	order: 2;
}

.eternity-brand-closing__image {
	order: 1;
}

.eternity-brand-closing__photo {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 400px;
	object-fit: cover;
	object-position: center;
}

.eternity-brand-closing__heading {
	font-family: 'Georgia', serif;
	font-size: 42px;
	font-weight: normal;
	line-height: 1.3;
	margin: 0 0 25px 0;
	color: var(--eternity-navy-deep);
}

.eternity-brand-closing__copy {
	font-size: 18px;
	color: #666;
	margin: 0 0 35px 0;
	line-height: 1.7;
	font-weight: 300;
	max-width: 500px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
	/* Section Spacing */
	.eternity-section__container {
		padding: 40px 20px;
	}

	.eternity-section__title {
		font-size: 32px;
	}

	.eternity-section__description {
		font-size: 16px;
	}

	/* Hero */
	.eternity-hero__content {
		grid-template-columns: 1fr;
		gap: 40px;
		padding: 0 20px;
	}

	.eternity-hero__image {
		order: unset;
	}

	.eternity-hero__heading {
		font-size: 40px;
	}

	.eternity-hero__ctas {
		flex-direction: column;
	}

	.eternity-hero__ctas .eternity-btn {
		width: 100%;
		text-align: center;
	}

	/* Engagement Rings */
	.eternity-engagement-rings__grid {
		grid-template-columns: 1fr;
		padding: 0 20px;
	}

	.eternity-engagement-rings__content {
		padding: 40px 46px;
	}

	.eternity-engagement-rings__text {
		margin-bottom: 38px;
	}

	/* Wedding Bands */
	.eternity-wedding-bands__subsection {
		padding: 0 20px;
	}

	.eternity-wedding-bands__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Jewellery */
	.eternity-jewellery__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
		padding: 0 20px;
	}

	/* Diamond Choice */
	.eternity-diamond-choice__grid {
		grid-template-columns: 1fr;
		gap: 30px;
		padding: 0 20px;
	}

	.eternity-diamond-choice__column {
		padding: 40px 16px;
	}

	.eternity-diamond-choice__heading {
		font-size: 22px;
	}

	/* Why Eternity */
	.eternity-why-eternity__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
		padding: 0 20px;
	}

	.eternity-why-eternity__card {
		padding: 20px;
	}

	/* Featured Products */
	.eternity-featured-products__grid {
		grid-template-columns: repeat(2, 1fr);
		padding: 0 20px;
	}

	/* Appointment */
	.eternity-appointment__container {
		grid-template-columns: 1fr;
		gap: 40px;
		padding: 0 20px;
	}

	.eternity-appointment__heading {
		font-size: 32px;
	}

	/* Reviews */
	.eternity-reviews__grid {
		grid-template-columns: 1fr;
		padding: 0 20px;
	}

	/* Brand Closing */
	.eternity-brand-closing__content-wrapper {
		grid-template-columns: 1fr;
		gap: 40px;
		padding: 0 20px;
	}

	.eternity-brand-closing__heading {
		font-size: 32px;
	}
}

@media (max-width: 480px) {
	.eternity-section__title {
		font-size: 26px;
	}

	.eternity-hero__heading {
		font-size: 32px;
	}

	.eternity-hero__subheading {
		font-size: 16px;
	}

	.eternity-engagement-rings__heading {
		font-size: 24px;
	}

	.eternity-wedding-bands__subtitle {
		font-size: 24px;
	}

	.eternity-wedding-bands__grid {
		grid-template-columns: 1fr;
	}

	/* One category per row, matching the Wedding Bands mobile card
	   treatment: large centered square image, title, single centered
	   button, with the same spacing values Wedding Bands already uses. */
	.eternity-jewellery__grid {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.eternity-jewellery__image {
		aspect-ratio: 1;
		height: auto;
	}

	.eternity-jewellery__photo {
		aspect-ratio: 1 / 1;
		height: auto;
	}

	.eternity-jewellery__label {
		margin-bottom: 20px;
	}

	.eternity-why-eternity__grid {
		grid-template-columns: 1fr;
	}

	.eternity-featured-products__grid {
		grid-template-columns: 1fr;
	}

	.eternity-appointment__heading {
		font-size: 26px;
	}

	.eternity-brand-closing__heading {
		font-size: 26px;
	}

	.eternity-btn {
		padding: 12px 24px;
		font-size: 13px;
	}

	.eternity-placeholder {
		min-height: 250px;
	}

	.eternity-placeholder--hero {
		min-height: 300px;
	}

	.eternity-brand-closing__photo {
		min-height: 300px;
	}

	.eternity-hero__photo {
		min-height: 300px;
	}

	.eternity-appointment__photo {
		min-height: 250px;
	}

	.eternity-placeholder--product {
		min-height: 280px;
	}

	.eternity-jewellery__image,
	.eternity-jewellery__photo {
		height: 250px;
	}
}
