/**
 * BK Related Products Widget Styles
 * Author: Bùi Đức Hạnh (https://buhaweb.com/)
 * Prefix: bdh-bk-
 * Kit 4 Global Design System Compliant (Tông Xanh Lá Chủ Đạo)
 */

/* ==========================================================================
   1. ROOT & HEADER
   ========================================================================== */
.bdh-bk-related-products {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.bdh-bk-related-products *,
.bdh-bk-related-products *::before,
.bdh-bk-related-products *::after {
	box-sizing: border-box;
}

.bdh-bk-related-products__header {
	margin-bottom: 24px;
}

.bdh-bk-related-products__title {
	margin: 0;
	padding: 0;
	color: var(--e-global-color-d27c3cc, #1f2328);
	font-size: var(--e-global-typography-8dc9564-font-size, 24px);
	font-weight: var(--e-global-typography-8dc9564-font-weight, 700);
	line-height: var(--e-global-typography-8dc9564-line-height, 1.3);
}

.bdh-bk-related-products__line {
	width: 40px;
	height: 3px;
	background-color: var(--e-global-color-97923db, #1e6b3a);
	border-radius: 2px;
	margin-top: 8px;
	display: inline-block;
}

/* ==========================================================================
   2. SLIDER WRAPPER & CONTAINER
   ========================================================================== */
.bdh-bk-related-products__slider-wrap {
	position: relative;
	width: 100%;
}

.bdh-bk-related-products__slider {
	width: 100%;
	overflow: hidden;
	position: relative;
}

.bdh-bk-related-products__slider .swiper-wrapper {
	align-items: stretch;
}

.bdh-bk-related-products__slider .swiper-slide {
	height: auto;
	display: flex;
}

/* ==========================================================================
   3. PRODUCT CARD
   ========================================================================== */
.bdh-bk-related-products__card {
	position: relative;
	width: 100%;
	display: flex;
	flex-direction: column;
	background-color: var(--e-global-color-8d5d81d, #ffffff);
	border: 1px solid var(--e-global-color-fcc82ce, #e5e7eb);
	border-radius: 10px;
	padding: 14px 14px 16px;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.bdh-bk-related-products__card:hover {
	border-color: var(--e-global-color-1070229, #2cac55);
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Thumbnail Wrap */
.bdh-bk-related-products__thumb-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	background-color: #ffffff;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bdh-bk-related-products__thumb--aspect-1-1 {
	aspect-ratio: 1 / 1;
}

.bdh-bk-related-products__thumb--aspect-4-3 {
	aspect-ratio: 4 / 3;
}

.bdh-bk-related-products__thumb--aspect-natural {
	height: auto;
}

.bdh-bk-related-products__thumb-link {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bdh-bk-related-products__thumb-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.4s ease;
	user-select: none;
	-webkit-user-drag: none;
}

.bdh-bk-related-products__card:hover .bdh-bk-related-products__thumb-wrap img {
	transform: scale(1.05);
}

/* Sale Badge */
.bdh-bk-related-products__badge-sale {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 5;
	background-color: var(--e-global-color-d0d47e8, #ee3338);
	color: var(--e-global-color-8d5d81d, #ffffff);
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	box-shadow: 0 2px 6px rgba(238, 51, 56, 0.3);
}

/* Content */
.bdh-bk-related-products__card-content {
	display: flex;
	flex-direction: column;
	flex: 1;
	margin-top: 12px;
}

.bdh-bk-related-products__category {
	font-size: 12px;
	font-weight: 500;
	color: var(--e-global-color-76ff1c6, #4b5563);
	text-decoration: none;
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	transition: color 0.2s ease;
}

.bdh-bk-related-products__category:hover {
	color: var(--e-global-color-97923db, #1e6b3a);
}

.bdh-bk-related-products__card-title {
	margin: 0 0 8px 0;
	padding: 0;
	font-size: var(--e-global-typography-fc3ef67-font-size, 16px);
	font-weight: var(--e-global-typography-fc3ef67-font-weight, 600);
	line-height: var(--e-global-typography-fc3ef67-line-height, 1.35);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.7em;
}

.bdh-bk-related-products__card-title a {
	color: var(--e-global-color-d27c3cc, #1f2328);
	text-decoration: none;
	transition: color 0.2s ease;
}

.bdh-bk-related-products__card-title a:hover {
	color: var(--e-global-color-97923db, #1e6b3a);
}

/* Price */
.bdh-bk-related-products__price {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--e-global-color-d0d47e8, #ee3338);
	margin-top: auto;
	margin-bottom: 12px;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
}

.bdh-bk-related-products__price .amount,
.bdh-bk-related-products__price ins {
	color: var(--e-global-color-d0d47e8, #ee3338);
	text-decoration: none;
	font-weight: 700;
}

.bdh-bk-related-products__price del {
	color: var(--e-global-color-47f60d3, #9ca3af);
	font-weight: 400;
	font-size: 0.9em;
}

.bdh-bk-related-products__price-contact {
	color: var(--e-global-color-d0d47e8, #ee3338);
	font-weight: 700;
}

/* Action Button */
.bdh-bk-related-products__card-action {
	margin-top: 4px;
}

.bdh-bk-related-products__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 8px 14px;
	background-color: var(--e-global-color-d9c2012, #e8f6ec);
	color: var(--e-global-color-97923db, #1e6b3a);
	border: 1px solid var(--e-global-color-5c987e6, #7fcb98);
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.25s ease;
}

.bdh-bk-related-products__btn:hover {
	background-color: var(--e-global-color-938e6c1, #1C7D38);
	border-color: var(--e-global-color-938e6c1, #1C7D38);
	color: var(--e-global-color-8d5d81d, #ffffff);
}

/* ==========================================================================
   4. NAVIGATION ARROWS & DOTS
   ========================================================================== */
.bdh-bk-related-products__arrow {
	position: absolute;
	top: 45%;
	transform: translateY(-50%);
	z-index: 15;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background-color: var(--e-global-color-8d5d81d, #ffffff);
	color: var(--e-global-color-97923db, #1e6b3a);
	border: 1px solid var(--e-global-color-fcc82ce, #e5e7eb);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	outline: none;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bdh-bk-related-products__arrow svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.bdh-bk-related-products__arrow--prev {
	left: -18px;
}

.bdh-bk-related-products__arrow--next {
	right: -18px;
}

.bdh-bk-related-products__arrow:hover {
	background-color: var(--e-global-color-938e6c1, #1C7D38);
	color: var(--e-global-color-8d5d81d, #ffffff);
	border-color: var(--e-global-color-938e6c1, #1C7D38);
	transform: translateY(-50%) scale(1.08);
	box-shadow: 0 6px 16px rgba(42, 145, 80, 0.3);
}

.bdh-bk-related-products__arrow.swiper-button-disabled {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

/* Pagination */
.bdh-bk-related-products__pagination {
	position: relative;
	margin-top: 18px;
	display: flex;
	justify-content: center;
	gap: 6px;
	z-index: 5;
}

.bdh-bk-related-products__pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--e-global-color-fcc82ce, #e5e7eb);
	opacity: 0.8;
	transition: all 0.25s ease;
	cursor: pointer;
}

.bdh-bk-related-products__pagination .swiper-pagination-bullet-active {
	background: var(--e-global-color-1070229, #2cac55);
	width: 22px;
	border-radius: 4px;
	opacity: 1;
}

/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS (Tablet <= 1024px, Mobile <= 767px)
   ========================================================================== */
@media (max-width: 1024px) {
	.bdh-bk-related-products__arrow--prev {
		left: 4px;
	}
	.bdh-bk-related-products__arrow--next {
		right: 4px;
	}
}

@media (max-width: 767px) {
	.bdh-bk-related-products__arrow {
		width: 32px;
		height: 32px;
	}
	.bdh-bk-related-products__arrow svg {
		width: 12px;
		height: 12px;
	}
	.bdh-bk-related-products__arrow--prev {
		left: 2px;
	}
	.bdh-bk-related-products__arrow--next {
		right: 2px;
	}
}
