/* ============================================================
   lakasg – Frequently Bought Together Widget
   ============================================================ */

/* Wrapper */
.lakasg-together-wrap {
	font-family: inherit;
	padding: 24px 0;
	box-sizing: border-box;
}

/* Section title */
.lakasg-together-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: #111;
	margin: 0 0 20px;
	padding: 0;
	line-height: 1.3;
}

/* ── Products row (desktop) ──────────────────────────── */
.lakasg-together-products {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	flex-wrap: nowrap;
}

/* "+" separator between cards */
.lakasg-together-sep {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	font-weight: 700;
	color: #aaa;
	padding: 0 8px;
	flex-shrink: 0;
	user-select: none;
}

/* ── Single card ─────────────────────────────────────── */
.lakasg-together-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 16px 12px 14px;
	flex: 1 1 0;
	min-width: 0;
	position: relative;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	box-sizing: border-box;
}

.lakasg-together-card:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
	transform: translateY(-2px);
}

/* Placeholder card shown in Elementor editor */
.lakasg-together-card--placeholder {
	background: #f8f9fa;
	border: 2px dashed #d1d5db;
	min-height: 180px;
	justify-content: center;
	color: #9ca3af;
	font-size: 0.85rem;
	text-align: center;
	padding: 24px 16px;
}

/* ── Checkbox ────────────────────────────────────────── */
.lakasg-together-checkbox-wrap {
	position: absolute;
	top: 10px;
	left: 10px;
	cursor: pointer;
	z-index: 2;
	line-height: 1;
}

.lakasg-together-check {
	width: 17px;
	height: 17px;
	cursor: pointer;
	accent-color: #111;
	margin: 0;
	display: block;
}

/* ── Product image ───────────────────────────────────── */
.lakasg-together-img-link {
	display: block;
	width: 100%;
	height: 130px;   /* default fixed height — overridden by controls */
	margin-bottom: 10px;
	text-decoration: none;
	overflow: hidden;
}

/* Auto ratio: let the image define its own height */
.lakasg-together-img-link.ratio-auto {
	height: auto !important;
	aspect-ratio: unset !important;
}

/* Preset aspect ratios */
.lakasg-together-img-link.ratio-1\/1  { aspect-ratio: 1/1;   height: auto !important; }
.lakasg-together-img-link.ratio-4\/3  { aspect-ratio: 4/3;   height: auto !important; }
.lakasg-together-img-link.ratio-3\/2  { aspect-ratio: 3/2;   height: auto !important; }
.lakasg-together-img-link.ratio-16\/9 { aspect-ratio: 16/9;  height: auto !important; }
.lakasg-together-img-link.ratio-3\/4  { aspect-ratio: 3/4;   height: auto !important; }

.lakasg-together-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover; /* overridden by image_fit control */
}

/* Auto ratio: image sits at natural size, not stretched */
.lakasg-together-img-link.ratio-auto .lakasg-together-img {
	height: auto;
	max-width: 100%;
}

/* ── Product info ────────────────────────────────────── */
.lakasg-together-info {
	width: 100%;
	text-align: center;
	flex: 1;
	margin-bottom: 10px;
}

.lakasg-together-name-link {
	text-decoration: none;
}

.lakasg-together-name-link:hover .lakasg-together-name {
	text-decoration: underline;
}

.lakasg-together-name {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: #111;
	margin-bottom: 5px;
	line-height: 1.35;
}

.lakasg-together-price {
	font-size: 0.875rem;
	color: #555;
	line-height: 1.2;
}

.lakasg-together-price .woocommerce-Price-amount {
	color: inherit;
}

.lakasg-together-price ins {
	text-decoration: none;
}

/* ── Individual card button ──────────────────────────── */
.lakasg-together-card-btn-wrap {
	width: 100%;
	margin-top: auto;
}

.lakasg-together-card-btn {
	display: block;
	width: 100%;
	text-align: center;
	padding: 8px 10px;
	background-color: #111;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 600;
	border-radius: 6px;
	text-decoration: none;
	border: none;
	cursor: pointer;
	line-height: 1.3;
	transition: background-color 0.2s ease, color 0.2s ease;
	box-sizing: border-box;
}

.lakasg-together-card-btn:hover {
	background-color: #333;
	color: #fff;
	text-decoration: none;
}

/* ── Footer: total + add-all button ─────────────────── */
.lakasg-together-footer {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #e5e7eb;
	flex-wrap: wrap;
}

.lakasg-together-total {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.lakasg-together-total-label {
	font-size: 0.95rem;
	color: #555;
	font-weight: 500;
}

.lakasg-together-total-price {
	font-size: 1.35rem;
	font-weight: 700;
	color: #111;
}

/* "Add Selected to Cart" button */
.lakasg-together-add-all {
	background-color: #111;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 28px;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.2s ease, opacity 0.2s ease;
	line-height: 1.3;
}

.lakasg-together-add-all:hover:not(:disabled) {
	background-color: #333;
}

.lakasg-together-add-all:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Success state */
.lakasg-together-add-all.lakasg-success {
	background-color: #16a34a;
}

/* ============================================================
   Tablet  (768px – 1024px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 1024px) {
	.lakasg-together-products {
		flex-wrap: wrap;
		gap: 12px;
	}

	.lakasg-together-sep {
		display: none;
	}

	.lakasg-together-card {
		flex: 1 1 calc(33.333% - 8px);
		min-width: 130px;
	}
}

/* ============================================================
   Mobile  (up to 767px)  –  2-column grid, no separators
   ============================================================ */
@media (max-width: 767px) {
	.lakasg-together-products {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}

	.lakasg-together-sep {
		display: none;
	}

	/* Cards fill grid naturally – no flex overrides needed */
	.lakasg-together-card {
		width: 100%;
		flex: none;
	}

	.lakasg-together-footer {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.lakasg-together-total {
		justify-content: center;
	}

	.lakasg-together-add-all {
		width: 100%;
		text-align: center;
		padding: 14px 20px;
		font-size: 1rem;
	}
}

/* ── Bundle discount badge ───────────────────────────────── */
.lakasg-together-discount-badge {
	display: inline-block;
	width: 100%;
	background: linear-gradient(135deg, #fff7e6, #fff3d4);
	border: 1px solid #f0c040;
	color: #7a5c00;
	font-size: 0.85rem;
	font-weight: 500;
	padding: 8px 14px;
	border-radius: 6px;
	margin-bottom: 14px;
	box-sizing: border-box;
}

/* Strikethrough original total when discount active */
.lakasg-together-total-amounts {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.lakasg-together-total-original {
	font-size: 0.9rem;
	color: #aaa;
	text-decoration: line-through;
	font-weight: 400;
}

/* Green discounted price */
.lakasg-together-total-price.lakasg-price-discounted {
	color: #16a34a;
}

/* "You save" row */
.lakasg-together-savings {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	color: #16a34a;
	font-weight: 600;
	width: 100%;
}

.lakasg-savings-label {
	color: #16a34a;
}

.lakasg-savings-amount {
	color: #16a34a;
	font-weight: 700;
}

@media (max-width: 767px) {
	.lakasg-together-savings {
		justify-content: center;
	}
	.lakasg-together-total-amounts {
		align-items: center;
	}
}

/* ── Current product: locked checkbox ───────────────────── */
.lakasg-together-card--current .lakasg-together-check {
	opacity: 1;
	cursor: not-allowed;
	accent-color: #111;
}

.lakasg-together-card--current .lakasg-together-checkbox-wrap {
	cursor: not-allowed;
}
