/* =========================================================================
 * Flooring Child — Single Product enhancements (blue theme)
 * Scoped to body.nffc-enhanced-product so nothing leaks elsewhere.
 * ====================================================================== */

.nffc-enhanced-product {
	--fc-accent: #1f6fe0;        /* brand blue */
	--fc-accent-dark: #1657bd;
	--fc-navy: #0d2440;
	--fc-ink: #15263f;
	--fc-muted: #647389;
	--fc-line: #e3e8f0;
	--fc-bg-soft: #f3f7fd;
	--fc-radius: 14px;
	--fc-shadow: 0 18px 48px rgba(13, 36, 64, 0.12);
}

/* ----- Overall product layout -------------------------------------------- */

.nffc-enhanced-product div.product {
	margin-top: 10px;
}

@media (min-width: 992px) {
	.nffc-enhanced-product div.product {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-start;
		column-gap: 48px;
	}
	/* Default: each direct child is its own full-width row. Only the gallery
	 * and summary get pulled into the two-column top row. */
	.nffc-enhanced-product div.product > * {
		flex: 0 0 100%;
		max-width: 100%;
		width: 100%;
	}
	.nffc-enhanced-product div.product > .woocommerce-product-gallery {
		flex: 0 1 calc(52% - 24px);
		max-width: calc(52% - 24px);
		width: auto;
		margin: 0;
	}
	.nffc-enhanced-product div.product > .summary.entry-summary {
		flex: 0 1 calc(48% - 24px);
		max-width: calc(48% - 24px);
		width: auto;
		margin: 0;
	}
}

/* ----- Gallery polish ---------------------------------------------------- */

.nffc-enhanced-product .woocommerce-product-gallery__wrapper img {
	border-radius: var(--fc-radius);
	box-shadow: var(--fc-shadow);
}

.nffc-enhanced-product .woocommerce-product-gallery .flex-control-thumbs {
	margin-top: 14px;
}

.nffc-enhanced-product .woocommerce-product-gallery .flex-control-thumbs img {
	border-radius: 8px;
	border: 2px solid transparent;
	transition: border-color 0.15s ease;
}

.nffc-enhanced-product .woocommerce-product-gallery .flex-control-thumbs img:hover,
.nffc-enhanced-product .woocommerce-product-gallery .flex-control-thumbs .flex-active {
	border-color: var(--fc-accent);
}

.nffc-enhanced-product .woocommerce-product-gallery .onsale {
	background: var(--fc-accent);
	color: #fff;
	border: none;
	border-radius: 999px;
	min-height: auto;
	min-width: auto;
	padding: 6px 16px;
	font-weight: 700;
	line-height: 1;
}

/* On tablet/phone: main image on TOP, thumbnails in a row BELOW
 * (the parent theme floats the thumbnails to the left otherwise). */
@media (max-width: 991px) {
	.nffc-enhanced-product .woocommerce-product-gallery {
		width: 100% !important;
		float: none !important;
		margin: 0 0 8px !important;
		display: block !important;
	}
	/* The clipping window should be full width... */
	.nffc-enhanced-product .woocommerce-product-gallery .flex-viewport {
		width: 100% !important;
		float: none !important;
		margin: 0 !important;
	}
	/* ...but NEVER force a width on the slides strip — FlexSlider sizes it
	 * to hold every slide side-by-side. Only clear the float/margin. */
	.nffc-enhanced-product .woocommerce-product-gallery__wrapper {
		float: none !important;
		margin: 0 !important;
	}
	.nffc-enhanced-product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs,
	.nffc-enhanced-product .woocommerce-product-gallery ol.flex-control-thumbs {
		position: static !important;
		display: flex !important;
		flex-wrap: wrap !important;
		gap: 8px;
		width: 100% !important;
		float: none !important;
		margin: 12px 0 0 !important;
		padding: 0 !important;
		list-style: none !important;
	}
	.nffc-enhanced-product .woocommerce-product-gallery .flex-control-thumbs li {
		width: calc(20% - 7px) !important;
		margin: 0 !important;
		padding: 0 !important;
		float: none !important;
		list-style: none !important;
	}
	.nffc-enhanced-product .woocommerce-product-gallery .flex-control-thumbs li img {
		width: 100% !important;
		height: auto !important;
	}
}

/* ----- Summary column ---------------------------------------------------- */

.nffc-enhanced-product .summary .fc-product-eyebrow {
	display: inline-block;
	margin-bottom: 10px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--fc-bg-soft);
	color: var(--fc-accent-dark);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.nffc-enhanced-product .summary .product_title {
	font-size: 2.1rem;
	line-height: 1.2;
	color: var(--fc-ink);
	margin: 0 0 12px;
}

.nffc-enhanced-product .summary .price {
	color: var(--fc-ink);
	font-weight: 700;
	margin-bottom: 6px;
}

.nffc-enhanced-product .summary .price .amount {
	font-size: 1.9rem;
}

.nffc-enhanced-product .summary .price del {
	opacity: 0.5;
	font-weight: 400;
	margin-right: 8px;
}

.nffc-enhanced-product .summary .price ins {
	text-decoration: none;
	color: var(--fc-accent-dark);
}

.nffc-enhanced-product .summary .woocommerce-product-rating {
	margin-bottom: 16px;
}

/* ----- Calculator wrapper (the calculator itself is styled by the plugin) - */

.nffc-enhanced-product .fc-calculator-card {
	margin: 8px 0 18px;
}

.nffc-enhanced-product .fc-calculator-card .nffc-calculator {
	max-width: none;
	margin: 0;
}

/* The plugin keeps the native qty + button in sync; hide them so there is
 * no duplicate buy control inside the summary. */
.nffc-enhanced-product .fc-calculator-card ~ .quantity,
.nffc-enhanced-product div.product form.cart .fc-calculator-card ~ .single_add_to_cart_button {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ----- Two-cell info row (short description | NGS inventory) -------------- */

.nffc-enhanced-product .fc-info-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin: 18px 0 4px;
	border: 1px solid var(--fc-line);
	border-radius: var(--fc-radius);
	overflow: hidden;
	background: #fff;
	box-shadow: 0 8px 22px rgba(13, 36, 64, 0.06);
}

.nffc-enhanced-product .fc-info-split--single {
	grid-template-columns: 1fr;
}

.nffc-enhanced-product .fc-info-split__cell {
	padding: 16px 18px;
	min-width: 0;
}

.nffc-enhanced-product .fc-info-split__cell + .fc-info-split__cell {
	border-left: 1px solid var(--fc-line);
}

.nffc-enhanced-product .fc-info-split__title {
	margin: 0 0 9px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--fc-ink);
}

.nffc-enhanced-product .fc-info-split__body {
	color: var(--fc-muted);
	font-size: 14px;
	line-height: 1.65;
}

.nffc-enhanced-product .fc-info-split__body > :first-child { margin-top: 0; }
.nffc-enhanced-product .fc-info-split__body > :last-child { margin-bottom: 0; }

@media (max-width: 575px) {
	.nffc-enhanced-product .fc-info-split {
		grid-template-columns: 1fr;
	}
	.nffc-enhanced-product .fc-info-split__cell + .fc-info-split__cell {
		border-left: none;
		border-top: 1px solid var(--fc-line);
	}
}

/* ----- Feature tiles ----------------------------------------------------- */

.nffc-enhanced-product .fc-feature-badges {
	list-style: none;
	margin: 24px 0 0;
	padding: 22px 0 0;
	border-top: 1px solid var(--fc-line);
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.nffc-enhanced-product .fc-feature-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 18px 10px;
	text-align: center;
	border-radius: 14px;
	background: linear-gradient(160deg, var(--fc-accent) 0%, var(--fc-navy) 130%);
	color: #fff;
	box-shadow: 0 10px 24px rgba(13, 36, 64, 0.16);
}

.nffc-enhanced-product .fc-feature-badge__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	flex: 0 0 auto;
}

.nffc-enhanced-product .fc-feature-badge__copy {
	display: block;
	line-height: 1.25;
}

.nffc-enhanced-product .fc-feature-badge__copy strong {
	color: #fff;
	font-size: 13.5px;
	font-weight: 700;
}

/* ----- Hide product tags (keeps SKU / categories) ------------------------ */

.nffc-enhanced-product .product_meta .tagged_as {
	display: none !important;
}

/* ----- Breadcrumbs ------------------------------------------------------- */

.nffc-enhanced-product .fc-breadcrumbs {
	flex: 0 0 100%;
	width: 100%;
	margin: 0 0 22px;
	padding: 12px 18px;
	background: var(--fc-bg-soft);
	border: 1px solid var(--fc-line);
	border-radius: 10px;
	font-size: 13px;
}

.nffc-enhanced-product .fc-breadcrumbs .fc-breadcrumbs__inner,
.nffc-enhanced-product .fc-breadcrumbs nav,
.nffc-enhanced-product .fc-breadcrumbs .woocommerce-breadcrumb {
	margin: 0;
	padding: 0;
	color: var(--fc-muted);
	line-height: 1.5;
}

.nffc-enhanced-product .fc-breadcrumbs a {
	color: var(--fc-accent-dark);
	text-decoration: none;
	font-weight: 600;
}

.nffc-enhanced-product .fc-breadcrumbs a:hover {
	text-decoration: underline;
}

.nffc-enhanced-product .fc-breadcrumbs .fc-breadcrumbs__sep {
	margin: 0 8px;
	color: #b9c4d4;
}

/* ----- Description / Additional Info accordion --------------------------- */

.nffc-enhanced-product .fc-accordion {
	margin-top: 46px;
	border-radius: var(--fc-radius);
	overflow: hidden;
	border: 1px solid var(--fc-line);
	box-shadow: 0 12px 30px rgba(13, 36, 64, 0.07);
	background: #fff;
}

.nffc-enhanced-product .fc-accordion__item + .fc-accordion__item {
	border-top: 1px solid var(--fc-line);
}

.nffc-enhanced-product .fc-accordion__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 20px 24px;
	border: none;
	background: #fff;
	cursor: pointer;
	font-size: 1.08rem;
	font-weight: 700;
	color: var(--fc-ink);
	text-align: left;
	transition: background 0.18s ease, color 0.18s ease;
}

.nffc-enhanced-product .fc-accordion__header:hover {
	background: var(--fc-bg-soft);
}

.nffc-enhanced-product .fc-accordion__item.is-open .fc-accordion__header {
	color: var(--fc-accent-dark);
	background: var(--fc-bg-soft);
}

.nffc-enhanced-product .fc-accordion__chevron {
	display: inline-flex;
	flex: 0 0 auto;
	margin-left: 16px;
	color: var(--fc-accent);
	transition: transform 0.28s ease;
}

.nffc-enhanced-product .fc-accordion__item.is-open .fc-accordion__chevron {
	transform: rotate(180deg);
}

.nffc-enhanced-product .fc-accordion__panel {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.32s ease;
}

.nffc-enhanced-product .fc-accordion__inner {
	padding: 4px 24px 26px;
	color: var(--fc-muted);
	font-size: 15px;
	line-height: 1.75;
}

.nffc-enhanced-product .fc-accordion__inner > :first-child { margin-top: 0; }
.nffc-enhanced-product .fc-accordion__inner > :last-child { margin-bottom: 0; }

.nffc-enhanced-product .fc-accordion__inner table.shop_attributes {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.nffc-enhanced-product .fc-accordion__inner table.shop_attributes th,
.nffc-enhanced-product .fc-accordion__inner table.shop_attributes td {
	padding: 11px 14px;
	border: 1px solid var(--fc-line);
	text-align: left;
	font-size: 14px;
}

.nffc-enhanced-product .fc-accordion__inner table.shop_attributes th {
	width: 38%;
	background: var(--fc-bg-soft);
	color: var(--fc-ink);
	font-weight: 700;
}

.nffc-enhanced-product .fc-accordion__inner table.shop_attributes td {
	color: var(--fc-muted);
}

.nffc-enhanced-product .fc-accordion__inner table.shop_attributes td p { margin: 0; }

/* ----- Related / upsell products -----------------------------------------
 * Cards inherit the clean shop-card style (View Product button, no white box,
 * non-italic) from shop.css. This just frames the section. */

.nffc-enhanced-product .related.products,
.nffc-enhanced-product .upsells.products {
	clear: both;
	margin-top: 44px;
	padding-top: 30px;
	border-top: 1px solid var(--fc-line);
}

.nffc-enhanced-product .related > h2,
.nffc-enhanced-product .upsells > h2 {
	color: var(--fc-ink);
	font-style: normal !important;
	font-size: 1.4rem;
	margin: 0 0 22px;
}

/* ----- Small screens ----------------------------------------------------- */

@media (max-width: 575px) {
	.nffc-enhanced-product .summary .product_title {
		font-size: 1.6rem;
	}
	.nffc-enhanced-product .fc-feature-badges {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.nffc-enhanced-product .fc-accordion__header {
		padding: 16px 18px;
		font-size: 1rem;
	}
	.nffc-enhanced-product .fc-accordion__inner {
		padding: 4px 18px 22px;
	}
	.nffc-enhanced-product .fc-accordion__inner table.shop_attributes th {
		width: 45%;
	}
}
