/* Frequently Bought Together - front end */
/* One product per row; each row = image | title+price | variant select + button */

.hh-fbt-block {
	margin: 0 0 2em;
	padding:0;
	clear: both;
}

.hh-fbt-title {
	font-size: 1.25rem;
	margin: 0 0 1rem;
	padding: 0;
}

/* One product per row only */
.hh-fbt-products {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hh-fbt-product {
	margin: 0;
	padding: 0;
	border: 1px solid #e5e5e5;
	overflow: visible;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Row layout: image | title+price | variant select + button */
.hh-fbt-product-inner {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1rem;
}

@media (min-width: 640px) {
	.hh-fbt-product-inner {
		flex-direction: row;
		align-items: center;
		flex-wrap: nowrap;
		justify-content: space-between;
		gap: 1rem;
		padding: 1.25rem 1.5rem;
	}
}

/* Column 1: Image - 54px */
.hh-fbt-product-image {
	flex-shrink: 0;
	width: 54px;
}

.hh-fbt-product-image a {
	display: block;
	border-radius: 4px;
	overflow: hidden;
	background: #f5f5f5;
}

.hh-fbt-product-link img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border: 0;
}

/* Column 2: Title and price */
.hh-fbt-product-info {
	flex: 1;
	min-width: 0;
}

.hh-fbt-product-link-text {
	display: block;
	text-decoration: none;
	color: #222;
}

.hh-fbt-product-link-text:hover .hh-fbt-product-name {
	text-decoration: underline;
}

.hh-fbt-product-name {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 0.25rem;
	line-height: 1.3;
	color: #222;
}

.hh-fbt-product-price {
	display: block;
	font-size: 0.9rem;
	color: #444;
	font-weight: 500;
}

.hh-fbt-product-price del {
	color: #999;
}

/* Column 3: Variant select + button - push to right edge of container */
.hh-fbt-product-actions {
	flex-shrink: 0;
	width: 100%;
	overflow: visible;
}

@media (min-width: 640px) {
	.hh-fbt-product-actions {
		width: auto;
		flex: 0 0 auto;
		min-width: 0;
		margin-left: auto;
	}
}

.hh-fbt-product-actions .cart {
	margin: 0;
}

/* Add to cart button - brand color #3C8599, always clickable */
.hh-fbt-product-actions .button,
.hh-fbt-product-actions .add_to_cart_button,
.hh-fbt-product-actions a.button {
	white-space: nowrap;
	margin: 0;
	background-color: #3C8599 !important;
	border-color: #3C8599 !important;
	color: #fff !important;
	position: relative;
	z-index: 1;
	pointer-events: auto;
	cursor: pointer;
}

.hh-fbt-product-actions .button:hover,
.hh-fbt-product-actions .add_to_cart_button:hover:not(.disabled),
.hh-fbt-product-actions a.button:hover {
	background-color: #2f6b7a !important;
	border-color: #2f6b7a !important;
	color: #fff !important;
}

/* Added to cart state – checkmark like variant product */
.hh-fbt-product-actions .hh-fbt-added {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	background-color: #3C8599 !important;
	border-color: #3C8599 !important;
	color: #fff !important;
	cursor: default;
	pointer-events: none;
}

.hh-fbt-product-actions .hh-fbt-added .hh-fbt-check {
	flex-shrink: 0;
}

/* Variable product: dropdowns and button - more spacing, no clipping */
.hh-fbt-variations-form {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	overflow: visible;
}

@media (min-width: 640px) {
	.hh-fbt-variations-form {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: end;
		gap: 0.75rem 1rem;
	}
}

.hh-fbt-variations {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
}

.hh-fbt-variation-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.hh-fbt-variation-label {
	display: none;
}

/* Variation select – cleaner look */
.hh-fbt-variation-select,
.hh-fbt-variations select,
.variations.hh-fbt-variations select {
	min-width: 140px;
	width: auto;
	max-width: 220px;
	height: 2.5rem;
	padding: 0 2.25rem 0 0.75rem;
	font-size: 0.9rem;
	font-weight: 500;
	color: #222;
	line-height: 1.4;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%23555' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.6rem center;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hh-fbt-variation-select {
    padding: 0.45em 1.75em 0.45em 0.65em !important;
    border: 1px solid #ddd !important;
}

.hh-fbt-variation-select:hover,
.hh-fbt-variations select:hover,
.variations.hh-fbt-variations select:hover {
	border-color: #9ca3af;
}

.hh-fbt-variation-select:focus,
.hh-fbt-variations select:focus,
.variations.hh-fbt-variations select:focus {
	outline: none;
	border-color: #3C8599;
	box-shadow: 0 0 0 2px rgba(60, 133, 153, 0.2);
}

.hh-fbt-single-variation-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.hh-fbt-single-variation-wrap .single_variation {
	margin: 0;
}

.hh-fbt-variation-actions {
	flex-shrink: 0;
	margin-left: 0.25rem;
}

.hh-fbt-variation-actions .button {
	min-width: 120px;
}

@media (max-width: 639px) {
	.hh-fbt-variation-actions .button {
		width: 100%;
	}
}

.hh-fbt-variation-actions .button.disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

/* Hide product descriptions */
.hh-fbt-product .woocommerce-product-details__short-description,
.hh-fbt-product .short-description,
.hh-fbt-product .product-excerpt,
.hh-fbt-product .wp-block-woocommerce-product-summary__short-description {
	display: none !important;
}
