/* Feramo V2 – single product stylesheet (loaded after woocommerce.css) */

/* 1. Wrappers */
.single-product .woocommerce-notices-wrapper {
	max-width: var(--feramo-container);
	margin-inline: auto;
	padding-inline: var(--feramo-gutter);
}

.feramo-product-breadcrumb {
	padding-top: 24px;
}

/* 2. Main layout */
.feramo-product-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
	gap: 48px 72px;
	align-items: start;
	padding-block: 28px 96px;
}

.feramo-product-main .summary {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	float: none;
	width: auto;
	margin: 0;
}

@media (max-width: 1199.98px) {
	.feramo-product-main {
		gap: 40px;
	}
}

/* 3. Gallery */
.feramo-product-gallery {
	position: relative;
	min-width: 0;
}

.feramo-product-gallery .woocommerce-product-gallery {
	position: relative;
	float: none;
	width: auto;
	margin: 0;
}

.feramo-product-gallery .woocommerce-product-gallery__wrapper {
	margin: 0;
	padding: 0;
}

.feramo-product-gallery .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
	background: #ece8e3;
}

.feramo-product-gallery .flex-viewport {
	border-radius: 6px;
}

.feramo-product-gallery .woocommerce-product-gallery:has(> .flex-control-thumbs) {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 16px;
}

.feramo-product-gallery .woocommerce-product-gallery:has(> .flex-control-thumbs) .flex-viewport {
	grid-area: 1 / 2;
}

.feramo-product-gallery .flex-control-thumbs {
	display: flex;
	flex-direction: column;
	grid-area: 1 / 1;
	gap: 12px;
	max-height: min(820px, 100%);
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

.feramo-product-gallery .flex-control-thumbs li {
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
}

.feramo-product-gallery .flex-control-thumbs img {
	display: block;
	width: 88px;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border: 1px solid transparent;
	border-radius: 4px;
	opacity: 0.7;
	cursor: pointer;
}

.feramo-product-gallery .flex-control-thumbs img.flex-active,
.feramo-product-gallery .flex-control-thumbs img:hover {
	border-color: var(--feramo-ink);
	opacity: 1;
}

.feramo-product-gallery .woocommerce-product-gallery__trigger {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	color: var(--feramo-ink);
	text-decoration: none;
}

.feramo-product-gallery .woocommerce-product-gallery__trigger span {
	font-size: 0;
}

.feramo-product-gallery .woocommerce-product-gallery__trigger::before {
	content: "";
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.feramo-product-gallery .onsale {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	min-height: 0;
	min-width: 0;
	margin: 0;
	padding: 6px 12px;
	border-radius: var(--feramo-radius-pill);
	background: var(--feramo-ink);
	color: #fff;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.feramo-product-gallery:has(.flex-control-thumbs) .onsale {
	left: 120px;
}

/* 4. Summary head */
.feramo-product__category {
	letter-spacing: 0.2em;
}

.feramo-product-main .product_title {
	margin: 0;
	font-family: var(--feramo-font-serif);
	font-size: 44px;
	font-weight: 400;
	line-height: 1.1;
}

.feramo-product-main .summary > .price {
	margin: 0;
	font-size: 22px;
	font-weight: 500;
	color: var(--feramo-ink);
}

.feramo-product-main .summary > .price del {
	font-size: 16px;
	font-weight: 400;
	color: var(--feramo-muted);
}

.feramo-product-main .summary > .price ins {
	text-decoration: none;
}

.feramo-product-main .woocommerce-product-details__short-description {
	font-size: 15px;
	line-height: 1.75;
	color: var(--feramo-body);
}

.feramo-product-main .woocommerce-product-details__short-description p {
	margin: 0;
}

.feramo-product-main .woocommerce-product-details__short-description a {
	color: var(--feramo-ink);
	text-decoration: underline;
}

.feramo-product-main .woocommerce-product-rating {
	display: flex;
	align-items: center;
	font-size: 13px;
}

/* 5. Variations form */
.feramo-product-main form.cart {
	margin: 16px 0 0;
}

.feramo-product-main table.variations,
.feramo-product-main table.variations tbody {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
}

.feramo-product-main table.variations {
	border-top: 1px solid var(--feramo-line);
}

.feramo-product-main table.variations tr {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	gap: 14px 16px;
	padding-top: 24px;
}

.feramo-product-main table.variations th.label {
	display: block;
	padding: 0;
	text-align: left;
	font-size: 13px;
	font-weight: 600;
}

.feramo-product-main table.variations th.label label {
	font-weight: 600;
}

.feramo-variation-current {
	margin-left: 8px;
	font-weight: 400;
}

.feramo-product-main table.variations td.value {
	display: contents;
}

.feramo-product-main table.variations select {
	grid-column: 1 / -1;
	height: 44px;
	padding: 0 40px 0 18px;
	border: 1px solid var(--feramo-line-strong);
	border-radius: var(--feramo-radius-pill);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231d1d1d' stroke-width='1.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center;
	color: var(--feramo-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.feramo-product-main table.variations select[hidden] {
	display: none;
}

.feramo-size-guide {
	grid-area: 1 / 2;
	padding: 8px 0;
	font-size: 13px;
}

.feramo-variation-pills {
	display: flex;
	flex-wrap: wrap;
	grid-column: 1 / -1;
	gap: 10px;
}

.feramo-variation-pill {
	min-width: 56px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--feramo-line-strong);
	border-radius: var(--feramo-radius-pill);
	background: #fff;
	color: var(--feramo-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.feramo-variation-pill[aria-pressed="true"] {
	border-color: var(--feramo-ink);
	background: var(--feramo-ink);
	color: #fff;
}

.feramo-variation-pill:hover:not(:disabled) {
	border-color: var(--feramo-ink);
}

.feramo-variation-pill:disabled,
.feramo-variation-pill.is-unavailable {
	color: var(--feramo-muted);
	opacity: 0.5;
	text-decoration: line-through;
	cursor: not-allowed;
}

/* Hidden until WooCommerce's variation script reveals it (inline visibility). */
.feramo-product-main .reset_variations {
	visibility: hidden;
	grid-column: 1 / -1;
	justify-self: start;
	font-size: 12px;
	color: var(--feramo-muted);
	text-decoration: underline;
}

.feramo-product-main .single_variation_wrap {
	margin-top: 24px;
}

.feramo-product-main .woocommerce-variation {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}

.feramo-product-main .woocommerce-variation-price {
	font-size: 18px;
	font-weight: 500;
}

.feramo-product-main .woocommerce-variation-description {
	font-size: 14px;
	line-height: 1.7;
	color: var(--feramo-body);
}

.feramo-product-main .woocommerce-variation-description p {
	margin: 0;
}

/* 6. Add to cart */
.feramo-product-main .woocommerce-variation-add-to-cart,
.feramo-product-main form.cart:not(.variations_form) {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* !important: WooCommerce's variation script calls $qty.show() (inline display). */
.feramo-product-main .quantity:has(input[type="hidden"]) {
	display: none !important;
}

.feramo-product-main .single_add_to_cart_button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	height: 56px;
	margin: 0;
	padding: 0 24px;
	border: 0;
	border-radius: var(--feramo-radius-pill);
	background: var(--feramo-ink);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.04em;
	cursor: pointer;
}

.feramo-product-main .single_add_to_cart_button::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M5 8h14l-1 13H6L5 8z'/%3E%3Cpath d='M9 8V6a3 3 0 016 0v2'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M5 8h14l-1 13H6L5 8z'/%3E%3Cpath d='M9 8V6a3 3 0 016 0v2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.feramo-product-main .single_add_to_cart_button:hover {
	background: var(--feramo-copper-dark);
	color: #fff;
}

.feramo-product-main .single_add_to_cart_button.disabled,
.feramo-product-main .single_add_to_cart_button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.feramo-product-main .stock {
	margin: 0;
	font-size: 13px;
}

.feramo-product-main .stock.in-stock {
	color: var(--feramo-muted);
}

.feramo-product-main .stock.out-of-stock {
	color: #a3361f;
}

.feramo-product-main #wc-stripe-express-checkout-element {
	margin-top: 12px;
}

/* !important: the Stripe script toggles inline display; hide the empty container so its margins leave no gap. */
.feramo-product-main #wc-stripe-express-checkout-element:not(:has(*)) {
	display: none !important;
}

.feramo-product-main wc-order-attribution-inputs {
	display: contents;
}

/* 7. Appointment CTA + semi-bespoke box */
.feramo-product__appointment {
	justify-content: center;
	width: 100%;
	height: 54px;
	margin-top: 12px;
	padding-block: 0;
	font-size: 14px;
}

.feramo-product__appointment svg {
	width: 16px;
	height: 16px;
}

.feramo-semi-bespoke {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin-top: 16px;
	padding: 22px 24px;
	border: 1px solid var(--feramo-line-warm);
	border-radius: 6px;
	background: var(--feramo-ivory);
}

.feramo-semi-bespoke > svg {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	color: var(--feramo-copper-dark);
}

.feramo-semi-bespoke__title {
	margin: 0 0 6px;
	font-family: var(--feramo-font-serif);
	font-size: 18px;
}

.feramo-semi-bespoke__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
	color: var(--feramo-body);
}

/* 8. Accordions */
.feramo-accordions {
	margin-top: 16px;
	border-top: 1px solid var(--feramo-line);
}

.feramo-accordion {
	border-bottom: 1px solid var(--feramo-line);
}

.feramo-accordion__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 0 14px;
	font-size: 14px;
	font-weight: 600;
	list-style: none;
	cursor: pointer;
}

.feramo-accordion__title::-webkit-details-marker {
	display: none;
}

.feramo-accordion__icon {
	position: relative;
	flex: 0 0 auto;
	width: 12px;
	height: 12px;
}

.feramo-accordion__icon::before,
.feramo-accordion__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 1.5px;
	margin-top: -0.75px;
	background: var(--feramo-ink);
	transition: transform 0.2s, opacity 0.2s;
}

.feramo-accordion__icon::after {
	transform: rotate(90deg);
}

.feramo-accordion[open] .feramo-accordion__icon::after {
	transform: rotate(180deg);
	opacity: 0;
}

.feramo-accordion__panel {
	padding-bottom: 20px;
	font-size: 14px;
	line-height: 1.75;
	color: var(--feramo-body);
}

.feramo-accordion__panel p {
	margin: 0 0 12px;
}

.feramo-accordion__panel > :last-child,
.feramo-accordion__panel p:last-child {
	margin-bottom: 0;
}

.feramo-accordion__panel table.woocommerce-product-attributes {
	width: 100%;
	border-collapse: collapse;
}

.feramo-accordion__panel table.woocommerce-product-attributes th {
	padding: 8px 16px 8px 0;
	text-align: left;
	font-weight: 600;
}

.feramo-accordion__panel table.woocommerce-product-attributes td {
	padding: 8px 0;
}

.feramo-accordion__panel table.woocommerce-product-attributes td p {
	margin: 0;
}

/* Reviews are currently disabled; minimal styles in case they are enabled. */
.feramo-accordion__panel #reviews ol.commentlist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.feramo-accordion__panel #reviews .comment-text {
	margin-bottom: 16px;
}

/* 9. Story band */
.feramo-product-story {
	background: var(--feramo-anthracite);
	color: #fff;
}

.feramo-product-story__inner {
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding-block: 80px;
}

.feramo-product-story__eyebrow {
	color: var(--feramo-copper);
}

.feramo-product-story__title {
	margin: 0;
	font-size: 44px;
	line-height: 1.12;
	color: #fff;
}

.feramo-product-story__title em {
	color: var(--feramo-copper);
}

.feramo-product-story__text {
	max-width: 640px;
	margin: 0;
	font-size: 16px;
	line-height: 1.75;
	color: var(--feramo-footer-text);
}

.feramo-product-story .feramo-btn {
	align-self: flex-start;
	margin-top: 6px;
}

.feramo-product-story .feramo-btn--outline-light:hover {
	border-color: var(--feramo-copper);
	background: var(--feramo-copper);
	color: #fff;
}

.feramo-product-story :focus-visible {
	outline-color: var(--feramo-copper);
}

/* 10. Upsells and related loops */
.feramo-wc-main section.up-sells,
.feramo-wc-main section.related {
	max-width: var(--feramo-container);
	margin-inline: auto;
	padding: 104px var(--feramo-gutter) 48px;
}

.feramo-wc-main section.related {
	padding: 56px var(--feramo-gutter) 112px;
}

.feramo-wc-main .feramo-product-story + section.related {
	padding-top: 104px;
}

.feramo-wc-main section.up-sells > h2,
.feramo-wc-main section.related > h2 {
	margin: 0 0 40px;
	font-family: var(--feramo-font-serif);
	font-size: 40px;
	font-weight: 400;
}

.feramo-wc-main section.up-sells ul.products,
.feramo-wc-main section.related ul.products {
	gap: 24px;
}

/* 11. Mobile */
@media (max-width: 899.98px) {
	.feramo-product-breadcrumb {
		padding-top: 14px;
	}

	.feramo-product-breadcrumb .feramo-breadcrumb__item:first-child,
	.feramo-product-breadcrumb .feramo-breadcrumb__item:first-child + .feramo-breadcrumb__sep,
	.feramo-product-breadcrumb .feramo-breadcrumb__item:last-child,
	.feramo-product-breadcrumb .feramo-breadcrumb__sep:nth-last-child(2) {
		display: none;
	}

	.feramo-product-main {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		padding-block: 12px 48px;
	}

	.feramo-product-gallery .woocommerce-product-gallery:has(> .flex-control-thumbs) {
		display: block;
	}

	.feramo-product-gallery .flex-control-thumbs {
		flex-direction: row;
		justify-content: center;
		gap: 6px;
		max-height: none;
		padding-top: 14px;
		overflow: visible;
	}

	.feramo-product-gallery .flex-control-thumbs li {
		width: 6px;
		height: 4px;
		border-radius: 4px;
		background: var(--feramo-line-strong);
		overflow: hidden;
	}

	.feramo-product-gallery .flex-control-thumbs li img {
		width: 100%;
		opacity: 0;
		border: 0;
	}

	.feramo-product-gallery .flex-control-thumbs li:has(img.flex-active) {
		width: 18px;
		background: var(--feramo-ink);
	}

	.feramo-product-gallery .onsale,
	.feramo-product-gallery:has(.flex-control-thumbs) .onsale {
		left: 16px;
	}

	.feramo-product-main .summary {
		gap: 10px;
	}

	.feramo-product__category {
		font-size: 11px;
		letter-spacing: 0.18em;
	}

	.feramo-product-main .product_title {
		font-size: 32px;
		line-height: 1.12;
	}

	.feramo-product-main .summary > .price {
		font-size: 20px;
	}

	.feramo-product-main .woocommerce-product-details__short-description {
		font-size: 14px;
		line-height: 1.7;
	}

	.feramo-product-main table.variations tr {
		padding-top: 20px;
	}

	.feramo-variation-pills {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 8px;
	}

	.feramo-variation-pill {
		min-width: 0;
	}

	.feramo-product-main .single_add_to_cart_button {
		height: 54px;
	}

	.feramo-product__appointment {
		height: 52px;
	}

	.feramo-semi-bespoke {
		gap: 14px;
		padding: 18px;
	}

	.feramo-semi-bespoke > svg {
		width: 24px;
		height: 24px;
	}

	.feramo-semi-bespoke__title {
		font-size: 16px;
	}

	.feramo-semi-bespoke__text {
		font-size: 13px;
		line-height: 1.6;
	}

	.feramo-accordion__title {
		padding: 16px 0;
	}

	.feramo-product-story__inner {
		gap: 16px;
		padding-block: 40px 48px;
	}

	.feramo-product-story__eyebrow {
		font-size: 11px;
		letter-spacing: 0.22em;
	}

	.feramo-product-story__title {
		font-size: 30px;
		line-height: 1.15;
	}

	.feramo-product-story__text {
		font-size: 14px;
		line-height: 1.7;
	}

	.feramo-product-story .feramo-btn {
		align-self: stretch;
		justify-content: center;
	}

	.feramo-wc-main section.up-sells {
		padding: 56px 0 24px;
	}

	.feramo-wc-main section.related {
		padding: 32px 0 64px;
	}

	.feramo-wc-main .feramo-product-story + section.related {
		padding-top: 56px;
	}

	.feramo-wc-main section.up-sells > h2,
	.feramo-wc-main section.related > h2 {
		margin: 0 var(--feramo-gutter) 24px;
		font-size: 28px;
	}

	.feramo-wc-main section.up-sells ul.products,
	.feramo-wc-main section.related ul.products {
		display: flex;
		gap: 12px;
		padding: 0 var(--feramo-gutter);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.feramo-wc-main section.up-sells ul.products::-webkit-scrollbar,
	.feramo-wc-main section.related ul.products::-webkit-scrollbar {
		display: none;
	}

	.feramo-wc-main section.up-sells ul.products li.product,
	.feramo-wc-main section.related ul.products li.product {
		flex: 0 0 200px;
		scroll-snap-align: start;
	}
}
