.category-bestseller {
	--category-bestseller-accent: #c2185b;
	--category-bestseller-sale: #d32f2f;
	--category-bestseller-badge: #1f2937;
	--category-bestseller-badge-text: #ffffff;
	--category-bestseller-discount-text: #ffffff;
	--category-bestseller-border: #e5e7eb;
	--category-bestseller-card: #ffffff;
	--category-bestseller-media: #ffffff;
	--category-bestseller-heading: inherit;
	--category-bestseller-name: inherit;
	--category-bestseller-price: inherit;
	--category-bestseller-progress: #e5e7eb;
	--category-bestseller-progress-fill: #c2185b;
	--category-bestseller-gap: 12px;
	container-type: inline-size;
	container-name: category-bestseller;
	margin: 0 0 30px;
}

.category-bestseller-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 12px;
}

.category-bestseller-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--category-bestseller-heading);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
}

.category-bestseller-title .fa {
	color: var(--category-bestseller-accent);
}

.category-bestseller-total {
	flex: none;
	color: var(--category-bestseller-accent);
	font-weight: 600;
	white-space: nowrap;
}

.category-bestseller-slider {
	position: relative;
}

.category-bestseller-carousel .swiper-container {
	overflow: hidden;
}

.category-bestseller-carousel .swiper-wrapper {
	display: flex;
}

.category-bestseller-carousel .swiper-slide {
	flex-shrink: 0;
	width: calc((100% - var(--category-bestseller-gap) * 2) / 2.2);
	height: auto;
}

.category-bestseller-carousel:not(.is-initialized) .swiper-wrapper {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.category-bestseller-carousel:not(.is-initialized) .swiper-wrapper::-webkit-scrollbar {
	display: none;
}

.category-bestseller-carousel:not(.is-initialized) .swiper-slide {
	margin-right: var(--category-bestseller-gap);
	scroll-snap-align: start;
}

.category-bestseller-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--category-bestseller-gap);
}

.category-bestseller-card {
	container-type: inline-size;
	container-name: category-bestseller-card;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--category-bestseller-border);
	border-radius: 12px;
	background: var(--category-bestseller-card);
}

.category-bestseller-media {
	position: relative;
	min-height: 44px;
	padding: 8px;
	background: var(--category-bestseller-media);
}

.category-bestseller-image {
	display: block;
}

.category-bestseller-image img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.category-bestseller-rank,
.category-bestseller-tip,
.category-bestseller-discount {
	position: absolute;
	top: 8px;
	padding: 3px 7px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.category-bestseller-rank {
	left: 8px;
	background: var(--category-bestseller-badge);
	color: var(--category-bestseller-badge-text);
}

.category-bestseller-tip {
	left: 8px;
	background: var(--category-bestseller-accent);
	color: var(--category-bestseller-badge-text);
}

.category-bestseller-discount {
	right: 8px;
	background: var(--category-bestseller-sale);
	color: var(--category-bestseller-discount-text);
}

.category-bestseller-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 6px;
	padding: 10px;
}

.category-bestseller-name {
	display: -webkit-box;
	overflow: hidden;
	min-height: 2.6em;
	color: var(--category-bestseller-name);
	font-weight: 600;
	line-height: 1.3;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.category-bestseller-description {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	font-size: 12px;
	line-height: 1.35;
	opacity: 0.75;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.category-bestseller-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	color: var(--category-bestseller-price);
}

.category-bestseller-price-new,
.category-bestseller-price-normal {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}

.category-bestseller-price-new {
	color: var(--category-bestseller-sale);
}

.category-bestseller-price-old {
	font-size: 13px;
	text-decoration: line-through;
	opacity: 0.6;
}

.category-bestseller-stock {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.category-bestseller-stock .fa {
	flex: none;
}

.category-bestseller-stock-dot::before {
	content: '';
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: currentColor;
}

.category-bestseller .btn.category-bestseller-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	height: auto;
	min-height: 44px;
	margin-top: auto;
	padding: 6px 8px;
	font-size: 14px;
	line-height: 1.2;
	white-space: normal;
	touch-action: manipulation;
}

.category-bestseller .btn.category-bestseller-cart .fa {
	color: inherit;
}

.category-bestseller .btn.category-bestseller-cart-custom:hover,
.category-bestseller .btn.category-bestseller-cart-custom:focus {
	filter: brightness(0.92);
}

.category-bestseller .btn.category-bestseller-cart[disabled] {
	cursor: not-allowed;
	opacity: 0.5;
}

.category-bestseller-nav {
	display: none;
	position: absolute;
	top: 40%;
	z-index: 2;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--category-bestseller-border);
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	font-size: 20px;
	line-height: 34px;
	text-align: center;
	transform: translateY(-50%);
	cursor: pointer;
}

.category-bestseller-prev {
	left: -6px;
}

.category-bestseller-next {
	right: -6px;
}

.category-bestseller .category-bestseller-nav.swiper-button-disabled {
	opacity: 0;
	pointer-events: none;
}

.category-bestseller .category-bestseller-pagination {
	position: relative;
	width: 96px;
	height: 4px;
	margin: 14px auto 0;
	overflow: hidden;
	border-radius: 2px;
	background: var(--category-bestseller-progress);
}

.category-bestseller .category-bestseller-pagination .swiper-pagination-progressbar-fill {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 2px;
	background: var(--category-bestseller-progress-fill);
	transform: scale(0);
	transform-origin: left top;
}

.category-bestseller .category-bestseller-pagination.swiper-pagination-lock,
.category-bestseller-carousel:not(.is-initialized) .category-bestseller-pagination {
	display: none;
}

.category-bestseller-more {
	margin-top: 16px;
	text-align: center;
}

.category-bestseller-more .btn {
	min-height: 44px;
	padding: 0 24px;
}

@container category-bestseller-card (max-width: 179.98px) {
	.category-bestseller-body {
		padding: 8px;
	}
}

@container category-bestseller-card (max-width: 149.98px) {
	.category-bestseller .btn.category-bestseller-cart {
		font-size: 13px;
	}

	.category-bestseller .btn.category-bestseller-cart .fa {
		display: none;
	}
}

@container category-bestseller (max-width: 329.98px) {
	.category-bestseller-carousel .swiper-slide {
		width: calc((100% - var(--category-bestseller-gap)) / 1.8);
	}
}

@container category-bestseller (min-width: 440px) {
	.category-bestseller-carousel .swiper-slide {
		width: calc((100% - var(--category-bestseller-gap) * 2) / 2.5);
	}
}

@container category-bestseller (min-width: 480px) {
	.category-bestseller-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@container category-bestseller (min-width: 580px) {
	.category-bestseller-carousel .swiper-slide {
		width: calc((100% - var(--category-bestseller-gap) * 3) / 3.3);
	}
}

@container category-bestseller (min-width: 640px) {
	.category-bestseller-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@container category-bestseller (min-width: 760px) {
	.category-bestseller-carousel .swiper-slide {
		width: calc((100% - var(--category-bestseller-gap) * 4) / 4.3);
	}
}

@container category-bestseller (min-width: 820px) {
	.category-bestseller-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

@container category-bestseller (min-width: 940px) {
	.category-bestseller-carousel .swiper-slide {
		width: calc((100% - var(--category-bestseller-gap) * 5) / 5.3);
	}
}

@container category-bestseller (min-width: 1000px) {
	.category-bestseller-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

@media (hover: hover) and (pointer: fine) {
	.category-bestseller-carousel .swiper-slide {
		width: calc((100% - var(--category-bestseller-gap)) / 2);
	}

	.category-bestseller-carousel.is-initialized .category-bestseller-nav {
		display: block;
	}

	.category-bestseller-carousel.is-initialized .category-bestseller-nav.swiper-button-lock {
		display: none;
	}

	@container category-bestseller (min-width: 580px) {
		.category-bestseller-carousel .swiper-slide {
			width: calc((100% - var(--category-bestseller-gap) * 2) / 3);
		}
	}

	@container category-bestseller (min-width: 760px) {
		.category-bestseller-carousel .swiper-slide {
			width: calc((100% - var(--category-bestseller-gap) * 3) / 4);
		}
	}

	@container category-bestseller (min-width: 940px) {
		.category-bestseller-carousel .swiper-slide {
			width: calc((100% - var(--category-bestseller-gap) * 4) / 5);
		}
	}

	@container category-bestseller (min-width: 1140px) {
		.category-bestseller-carousel .swiper-slide {
			width: calc((100% - var(--category-bestseller-gap) * 5) / 6);
		}
	}
}
