.ff-pdp {
	width: calc(100% - 60px);
	max-width: 1300px;
	margin: 0 auto;
	padding: 28px 0 80px;
}

.ff-pdp p {
	padding: 0;
	font-weight: 400;
}

.ff-pdp__top {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	align-items: start;
	gap: 64px;
	margin-top: 22px;
}

.ff-pdp__summary {
	position: sticky;
	top: calc(var(--ff-utility-height) + var(--ff-masthead-scrolled) + 24px);
}


/* WooCommerce hides the gallery until its script runs, which WP Rocket delays until
   the first interaction. Inline style, so it takes !important. */
.ff-pdp .woocommerce-product-gallery {
	position: relative;
	opacity: 1 !important;
}

.ff-pdp .woocommerce-product-gallery__wrapper {
	margin: 0;
}

.ff-pdp .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	height: auto;
}

.ff-pdp .woocommerce-product-gallery .flex-viewport,
.ff-pdp .woocommerce-product-gallery__wrapper {
	overflow: hidden;
	border-radius: 14px;
	background: #f7f5ee;
}

/* Until flexslider builds the slider, show one image and hold room for the thumbnail row. */
.ff-pdp .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image:nth-child(n+2) {
	display: none;
}

.ff-pdp .woocommerce-product-gallery:not(:has(.flex-viewport)):has(.woocommerce-product-gallery__image:nth-child(2)) {
	padding-bottom: calc(20% + 4px);
}

.ff-pdp .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 10px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.ff-pdp .flex-control-thumbs img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	border-radius: 10px;
	object-fit: cover;
	opacity: .7;
	cursor: pointer;
	transition: opacity .15s;
}

.ff-pdp .flex-control-thumbs img:hover {
	opacity: 1;
}

.ff-pdp .flex-control-thumbs img.flex-active {
	outline: 2px solid var(--ff-maroon);
	outline-offset: 2px;
	opacity: 1;
}

.ff-pdp .woocommerce-product-gallery__trigger {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 5;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
}


.ff-pdp .product_title {
	margin: 0 0 12px;
	padding: 0;
	color: var(--ff-ink);
	font: 700 40px/1.15 'Playfair Display', Georgia, serif;
}

.ff-pdp .price {
	margin: 0 0 20px;
	color: var(--ff-maroon);
	font-size: 26px;
	font-weight: 600;
}

.ff-pdp .woocommerce-product-details__short-description {
	margin-bottom: 24px;
	color: #5c564f;
	font-size: 16px;
	line-height: 1.7;
}

.ff-pdp p.stock {
	display: inline-flex;
	align-items: center;
	height: 26px;
	margin: 0 0 16px;
	padding: 0 12px;
	border-radius: 999px;
	line-height: 1;
	background: #edf2e9;
	color: #466238;
	font-size: 13px;
	font-weight: 600;
}

.ff-pdp p.stock.out-of-stock {
	background: #f6e9ea;
	color: var(--ff-maroon);
}

.ff-pdp form.cart:not(.variations_form),
.ff-pdp .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
}

.ff-pdp .quantity .qty {
	width: 76px;
	height: 54px;
	padding: 0 8px;
	border: 1px solid var(--ff-sand);
	border-radius: 999px;
	color: var(--ff-ink);
	font: 600 16px 'Open Sans', Arial, sans-serif;
	text-align: center;
}

/* Divi's Customizer button styles still load here and win without !important. */
.ff-pdp .single_add_to_cart_button {
	flex: 1;
	height: 54px;
	padding: 0 34px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--ff-maroon) !important;
	color: #fff !important;
	font: 600 16px 'Open Sans', Arial, sans-serif !important;
	cursor: pointer;
	transition: background-color .15s;
}

body #page-container .ff-pdp form.cart button.single_add_to_cart_button,
body #page-container .ff-pdp form.cart button.single_add_to_cart_button:hover,
body #page-container .ff-pdp form.cart button.single_add_to_cart_button:focus-visible {
	color: #fff !important;
}

.ff-pdp .single_add_to_cart_button::after {
	display: none !important;
}

.ff-pdp .single_add_to_cart_button:hover,
.ff-pdp .single_add_to_cart_button:focus-visible {
	background: #6a171e !important;
}

.ff-pdp .single_add_to_cart_button.disabled {
	opacity: .5;
	cursor: not-allowed;
}

.ff-pdp table.variations {
	width: 100%;
	margin: 0 0 16px;
	border-collapse: collapse;
}

.ff-pdp table.variations th,
.ff-pdp table.variations td {
	display: block;
	padding: 0;
	border: 0;
	text-align: left;
}

.ff-pdp table.variations label {
	display: block;
	margin-bottom: 6px;
	color: var(--ff-ink);
	font-size: 14px;
	font-weight: 600;
}

.ff-pdp table.variations select {
	width: 100%;
	height: 50px;
	padding: 0 14px;
	border: 1px solid var(--ff-sand);
	border-radius: 10px;
	background: #fff;
	color: var(--ff-ink);
	font: 400 15px 'Open Sans', Arial, sans-serif;
}

.ff-pdp .reset_variations {
	display: inline-block;
	margin-top: 8px;
	color: var(--ff-stone);
	font-size: 13px;
	text-decoration: underline;
}

.ff-pdp .woocommerce-variation-price {
	margin-bottom: 12px;
}

.ff-pdp .yith-wcwl-add-to-wishlist {
	margin: 0;
	color: var(--ff-stone);
	font-size: 14px;
}

.ff-pdp__notes {
	margin: 22px 0 0;
	padding: 20px 0 0;
	border-top: 1px solid #e8e4d8;
	list-style: none;
}

.ff-pdp__notes li {
	position: relative;
	padding: 4px 0 4px 26px;
	color: var(--ff-ink);
	font-size: 14px;
	font-weight: 400;
}

.ff-pdp__notes li::before {
	content: '';
	position: absolute;
	top: 8px;
	left: 3px;
	width: 6px;
	height: 11px;
	border: solid var(--ff-maroon);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.ff-pdp .woocommerce-message,
.ff-pdp .woocommerce-error,
.ff-pdp .woocommerce-info {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 18px 0 0;
	padding: 14px 18px;
	border-radius: 10px;
	/* Background comes from Divi's Customizer CSS, which sets the accent brown with !important. */
	color: #fff;
	list-style: none;
}

/* Divi's Customizer CSS colors .woocommerce a.button with !important. */
.ff-pdp .woocommerce-message .button {
	order: 2;
	color: #fff !important;
	font-weight: 700;
	text-decoration: underline;
}


.ff-pdp__about {
	margin-top: 72px;
	padding: 48px 56px;
	border-radius: 16px;
	background: #f7f5ee;
}

.ff-pdp__related {
	margin-top: 72px;
}

.ff-pdp__heading {
	margin: 0 0 22px;
	padding: 0;
	color: var(--ff-ink);
	font: 700 32px/1.2 'Playfair Display', Georgia, serif;
}

.ff-pdp__description {
	max-width: 820px;
	color: #5c564f;
	font-size: 16px;
	line-height: 1.75;
}

.ff-pdp__description p {
	margin: 0 0 1em;
}

.ff-pdp__description h2,
.ff-pdp__description h3,
.ff-pdp__description h4 {
	margin: 1.4em 0 .5em;
	padding: 0;
	color: var(--ff-ink);
	font: 700 21px/1.3 'Playfair Display', Georgia, serif;
}

.ff-pdp__description ul,
.ff-pdp__description ol {
	margin: 0 0 1em 1.3em;
	padding: 0;
}


@media (max-width: 1200px) {
	.ff-pdp__top {
		gap: 40px;
	}

	.ff-pdp .product_title {
		font-size: 34px;
	}
}

@media (max-width: 768px) {
	.ff-pdp {
		width: auto;
		padding: 20px 16px 48px;
	}

	.ff-pdp__top {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.ff-pdp__summary {
		position: static;
	}

	.ff-pdp .product_title {
		font-size: 30px;
	}

	.ff-pdp__about {
		margin-top: 44px;
		padding: 28px 20px;
		border-radius: 12px;
	}

	.ff-pdp__related {
		margin-top: 44px;
	}

	.ff-pdp__heading {
		font-size: 26px;
	}
}

@media (max-width: 480px) {
	.ff-pdp .product_title {
		font-size: 26px;
	}
}
