/**
 * OKU Frequently Bought Together – Frontend Styles
 * Brand colour: #186E70
 */

/* =========================================================
   WRAPPER
   ========================================================= */
.oku-fbt-wrapper {
	margin: 32px 0 16px;
	padding: 24px;
	border: 1px solid #e0e4e8;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 2px 12px rgba(0,0,0,.06);
	font-family: inherit;
}

/* =========================================================
   HEADER
   ========================================================= */
.oku-fbt-header {
	margin-bottom: 20px;
}

.oku-fbt-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: #111;
	margin: 0 0 4px;
	padding: 0;
	border: none;
}

/* =========================================================
   PRODUCT ROW  (horizontal on desktop, vertical on mobile)
   ========================================================= */
.oku-fbt-products-row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0;
}

.oku-fbt-plus {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	font-weight: 700;
	color: #555;
	padding: 0 10px;
	flex-shrink: 0;
}

/* =========================================================
   INDIVIDUAL ITEM CARD
   ========================================================= */
.oku-fbt-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 16px 12px 14px;
	border: 1.5px solid #e0e4e8;
	border-radius: 10px;
	background: #fafbfc;
	min-width: 140px;
	max-width: 180px;
	flex: 1 1 140px;
	position: relative;
	transition: border-color .2s, box-shadow .2s;
	text-align: center;
}

.oku-fbt-item:hover {
	border-color: #186E70;
	box-shadow: 0 2px 10px rgba(24,110,112,.13);
}

.oku-fbt-item--main {
	border-color: #186E70;
	background: #f0f9f9;
}

.oku-fbt-item--out-of-stock {
	opacity: .55;
	pointer-events: none;
}

/* =========================================================
   CHECKBOX
   ========================================================= */
.oku-fbt-checkbox-wrap {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
}

.oku-fbt-checkbox-wrap input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: #186E70;
}

/* =========================================================
   THUMBNAIL
   ========================================================= */
.oku-fbt-image-link {
	display: block;
	margin-top: 4px;
}

.oku-fbt-thumbnail {
	width: 90px;
	height: 90px;
	object-fit: contain;
	border-radius: 6px;
	display: block;
}

/* =========================================================
   PRODUCT INFO
   ========================================================= */
.oku-fbt-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 100%;
}

.oku-fbt-product-name {
	font-size: .82rem;
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: none;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-align: center;
}

.oku-fbt-product-name:hover {
	color: #186E70;
	text-decoration: underline;
}

.oku-fbt-price {
	font-size: .9rem;
	font-weight: 700;
	color: #186E70;
}

.oku-fbt-price .woocommerce-Price-amount { color: #186E70; }

.oku-fbt-price del {
	color: #999;
	font-weight: 400;
	font-size: .78rem;
}

.oku-fbt-badge {
	display: inline-block;
	font-size: .68rem;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 20px;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.oku-fbt-badge--this {
	background: #186E70;
	color: #fff;
}

.oku-fbt-oos-badge {
	font-size: .72rem;
	color: #c0392b;
	font-weight: 600;
}

/* =========================================================
   FOOTER – TOTAL + BUTTON
   ========================================================= */
.oku-fbt-footer {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid #e0e4e8;
}

.oku-fbt-total-wrap {
	display: flex;
	align-items: baseline;
	gap: 6px;
	font-size: 1rem;
}

.oku-fbt-total-label {
	font-weight: 600;
	color: #444;
}

.oku-fbt-total-price {
	font-size: 1.25rem;
	font-weight: 800;
	color: #186E70;
}

/* =========================================================
   ADD-ALL BUTTON
   ========================================================= */
.oku-fbt-add-all-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 26px;
	background: #186E70;
	color: #ffffff !important;
	border: none;
	border-radius: 8px;
	font-size: .95rem;
	font-weight: 700;
	cursor: pointer;
	text-transform: none;
	letter-spacing: .01em;
	transition: background .2s, transform .1s, box-shadow .2s;
	line-height: 1;
	box-shadow: 0 3px 10px rgba(24,110,112,.28);
}

.oku-fbt-add-all-btn:hover:not(:disabled) {
	background: #125658;
	box-shadow: 0 5px 14px rgba(24,110,112,.38);
	transform: translateY(-1px);
}

.oku-fbt-add-all-btn:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(24,110,112,.22);
}

.oku-fbt-add-all-btn:disabled {
	opacity: .65;
	cursor: not-allowed;
}

.oku-fbt-add-all-btn svg {
	flex-shrink: 0;
}

/* LOADING STATE */
.oku-fbt-add-all-btn.is-loading {
	pointer-events: none;
}

.oku-fbt-add-all-btn.is-loading::before {
	content: '';
	display: inline-block;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255,255,255,.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: okufbt-spin .7s linear infinite;
	margin-right: 4px;
}

/* SUCCESS STATE */
.oku-fbt-add-all-btn.is-success {
	background: #27ae60;
	box-shadow: 0 3px 10px rgba(39,174,96,.28);
}

/* =========================================================
   NOTICE / VIEW CART LINK
   ========================================================= */
.oku-fbt-notice {
	font-size: .88rem;
	color: #444;
	min-height: 22px;
}

.oku-fbt-notice a {
	color: #186E70;
	font-weight: 600;
	text-decoration: underline;
}

.oku-fbt-notice.is-error {
	color: #c0392b;
}

/* =========================================================
   ANIMATION
   ========================================================= */
@keyframes okufbt-spin {
	to { transform: rotate(360deg); }
}

/* =========================================================
   ITEM CHECKED/UNCHECKED VISUAL FEEDBACK
   ========================================================= */
.oku-fbt-item.is-unchecked {
	opacity: .5;
}

.oku-fbt-item.is-unchecked:hover {
	opacity: .75;
}

/* =========================================================
   RESPONSIVE – MOBILE
   ========================================================= */
@media ( max-width: 640px ) {
	.oku-fbt-wrapper {
		padding: 16px;
	}

	.oku-fbt-products-row {
		flex-direction: column;
		align-items: stretch;
	}

	.oku-fbt-item {
		flex-direction: row;
		max-width: 100%;
		text-align: left;
		gap: 12px;
		padding: 12px 14px;
	}

	.oku-fbt-image-link {
		flex-shrink: 0;
		margin-top: 0;
	}

	.oku-fbt-thumbnail {
		width: 64px;
		height: 64px;
	}

	.oku-fbt-info {
		align-items: flex-start;
	}

	.oku-fbt-product-name {
		text-align: left;
	}

	.oku-fbt-checkbox-wrap {
		top: 50%;
		transform: translateY(-50%);
		left: auto;
		right: 12px;
	}

	.oku-fbt-plus {
		justify-content: flex-start;
		padding: 4px 0;
		font-size: 1.2rem;
	}

	.oku-fbt-footer {
		flex-direction: column;
		align-items: flex-start;
	}

	.oku-fbt-add-all-btn {
		width: 100%;
		justify-content: center;
	}
}
