/* =========================================================
   =========================================================
   CATEGORY + PRODUCTS + PAGINATION
   =========================================================

   CATEGORY
   - Navigasi kategori
   - Category scroller
   - Active category
   - Arrow

   PRODUCTS
   - Desktop : 6 produk / baris
   - Tablet  : 4 produk / baris
   - Mobile  : 3 produk / baris

   PAGINATION
   - Previous
   - Number
   - Next

   =========================================================
   ========================================================= */


/* =========================================================
   GLOBAL
   ========================================================= */

.best-products-section {
	padding: 20px 0 8px;
	background: #fff;
}

.best-products-section *,
.best-products-section *::before,
.best-products-section *::after {
	box-sizing: border-box;
}


/* =========================================================
   =========================================================
   CATEGORY
   =========================================================
   ========================================================= */


/* =========================================================
   CATEGORY WRAPPER
   ========================================================= */

.best-products-category-wrap {
	width: 100%;
	margin-bottom: 28px;
}


/* =========================================================
   CATEGORY HEADER
   ========================================================= */

.best-category-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 12px;
}

.best-category-heading {
	display: flex;
	flex-direction: column;
}

.best-category-label {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #006400;
	margin-bottom: 3px;
}

.best-category-title {
	margin: 0;
	font-size: 19px;
	font-weight: 800;
	line-height: 1.2;
	color: #3D7A00 !important;
}

.best-category-description {
	margin: 4px 0 0;
	font-size: 11px;
	color: #555;
}

.best-category-description strong {
	color: #3D7A00;
}


/* =========================================================
   CATEGORY ARROWS
   ========================================================= */

.best-category-arrows {
	display: flex;
	gap: 6px;
}

.best-category-arrow {
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid #e5e5e5;
	border-radius: 50%;
	background: #fff;
	color: #555;

	display: flex;
	align-items: center;
	justify-content: center;

	cursor: pointer;
	transition: all .2s ease;
}

.best-category-arrow:hover {
	background: #62a900;
	border-color: #62a900;
	color: #fff;
}

.best-category-arrow:hover i {
	color: #fff;
}


/* =========================================================
   CATEGORY LIST
   ========================================================= */

.best-products-category {
	display: flex;
	align-items: center;
	gap: 9px;

	width: 100%;

	overflow-x: auto;
	overflow-y: hidden;

	padding: 2px 2px 10px;

	scroll-behavior: smooth;

	-webkit-overflow-scrolling: touch;

	scrollbar-width: none;

	cursor: grab;
}

.best-products-category::-webkit-scrollbar {
	display: none;
}

.best-products-category:active {
	cursor: grabbing;
}


/* =========================================================
   CATEGORY ITEM
   ========================================================= */

.best-category-item {
	flex: 0 0 auto;

	min-width: 105px;
	height: 48px;

	padding: 0 13px;

	display: inline-flex;
	align-items: center;

	gap: 8px;

	border: 1px solid #e7e7e7;
	border-radius: 11px;

	background: #fff;
	color: #555;

	text-decoration: none;

	font-size: 10px;
	font-weight: 700;

	white-space: nowrap;

	box-shadow: 0 2px 8px rgba(0, 0, 0, .035);

	transition:
		background .2s ease,
		border-color .2s ease,
		color .2s ease,
		box-shadow .2s ease;

	cursor: pointer;
}

.best-category-item:hover {
	color: #3D7A00;
	border-color: #cfe4b9;
	background: #fbfdf8;
	text-decoration: none;
}


/* =========================================================
   CATEGORY ICON
   ========================================================= */

.best-category-icon {
	width: 28px;
	height: 28px;

	flex: 0 0 28px;

	display: flex;
	align-items: center;
	justify-content: center;

	border-radius: 7px;

	background: #f1f8ea;
	color: #62a900;
}

.best-category-icon i {
	font-size: 11px;
	color: inherit;
}


/* =========================================================
   ACTIVE CATEGORY
   ========================================================= */

.best-products-category .best-category-item.active,
.best-products-category .best-category-item.active:hover,
.best-products-category .best-category-item.active:focus,
.best-products-category .best-category-item.active:active {
	background: #62a900 !important;
	border-color: #62a900 !important;
	color: #fff !important;
	text-decoration: none !important;

	box-shadow: 0 5px 14px rgba(98, 169, 0, .20);
}

.best-products-category
.best-category-item.active
.best-category-text {
	color: #fff !important;
}

.best-products-category
.best-category-item.active
.best-category-icon {
	background: rgba(255, 255, 255, .18) !important;
	color: #fff !important;
}

.best-products-category
.best-category-item.active
.best-category-icon i {
	color: #fff !important;
}


/* =========================================================
   =========================================================
   ⭐⭐⭐ CSS PRODUK ⭐⭐⭐
   =========================================================
   ========================================================= */


/* =========================================================
   PRODUCTS AREA
   ========================================================= */

.best-products-area {
	position: relative;
	width: 100%;
	min-height: 100px;
}


/* =========================================================
   ⭐ PRODUCT GRID
   DESKTOP : 6 PRODUK
   ========================================================= */

.best-products-grid {
	display: grid;

	grid-template-columns:
		repeat(6, minmax(0, 1fr));

	gap: 14px;

	width: 100%;
}


/* =========================================================
   ⭐ PRODUCT CARD
   ========================================================= */

.best-product-card {
	position: relative;

	display: flex;
	flex-direction: column;

	min-width: 0;

	padding: 7px;

	border: 1px solid #eeeeee;

	border-radius: 12px;

	background: #fff;

	overflow: hidden;

	transition:
		transform .2s ease,
		box-shadow .2s ease,
		border-color .2s ease;
}

.best-product-card:hover {
	transform: translateY(-3px);

	border-color: #e2e2e2;

	box-shadow:
		0 8px 24px rgba(0, 0, 0, .08);
}


/* =========================================================
   ⭐ PRODUCT IMAGE
   SELALU PERSEGI
   ========================================================= */

.best-product-image {
	position: relative;

	width: 100%;

	aspect-ratio: 1 / 1;

	overflow: hidden;

	border-radius: 9px;

	background: #f7f7f7;
}

.best-product-image > a:first-child {
	display: flex;

	align-items: center;
	justify-content: center;

	width: 100%;
	height: 100%;

	overflow: hidden;
}

.best-product-image img {
	display: block !important;

	width: 100% !important;
	height: 100% !important;

	object-fit: contain !important;

	object-position: center center !important;

	opacity: 1 !important;

	visibility: visible !important;

	filter: none !important;

	transition: transform .3s ease;
}

.best-product-card:hover
.best-product-image img {
	transform: scale(1.035);
}


/* =========================================================
   ⭐ SALE LABEL
   ========================================================= */

.best-sale-label {
	position: absolute;

	top: 7px;
	left: 7px;

	z-index: 5;

	display: inline-flex;

	align-items: center;

	gap: 3px;

	padding: 4px 7px;

	border-radius: 5px;

	background: #B00020;

	color: #fff;

	font-size: 8px;
	font-weight: 700;

	line-height: 1;

	text-transform: uppercase;
}

.best-sale-label.bg-primary {
	background: #2196f3;
}

.best-sale-label.bg-warning {
	background: #f5a623;
}


/* =========================================================
   ⭐ WISHLIST
   ========================================================= */

.best-wishlist {
	position: absolute;

	top: 7px;
	right: 7px;

	z-index: 6;

	display: flex;

	align-items: center;
	justify-content: center;

	width: 29px;
	height: 29px;

	padding: 0;

	border: 0;

	border-radius: 50%;

	background: rgba(255, 255, 255, .96);

	color: #555;

	box-shadow:
		0 2px 8px rgba(0, 0, 0, .1);

	font-size: 13px;

	cursor: pointer;

	transition: all .2s ease;
}

.best-wishlist:hover,
.best-wishlist.active {
	background: #62a900;
	color: #fff;
}

.best-wishlist i {
	color: inherit;
}


/* =========================================================
   ⭐ COUNTDOWN
   ========================================================= */

.best-countdown {
	position: absolute;

	left: 0;
	right: 0;
	bottom: 0;

	z-index: 5;

	display: flex;

	align-items: center;
	justify-content: center;

	padding: 6px 2px;

	background: rgba(0, 0, 0, .78);

	color: #fff;

	font-size: 8px;
	font-weight: 700;

	white-space: nowrap;
}

.best-countdown span {
	padding: 0 6px;

	border-right:
		1px solid rgba(255, 255, 255, .3);
}

.best-countdown span:last-child {
	border-right: 0;
}


/* =========================================================
   ⭐ PRODUCT DETAILS
   ========================================================= */

.best-product-details {
	display: flex;

	flex-direction: column;

	flex: 1;

	min-width: 0;

	padding: 9px 2px 2px;
}


/* =========================================================
   ⭐ PRODUCT NAME
   ========================================================= */

.best-product-name {
	width: 100%;

	min-width: 0;

	min-height: 34px;

	margin-bottom: 4px;
}

.best-product-name a {
	display: -webkit-box;

	width: 100%;

	overflow: hidden;

	color: #202020;

	font-size: 12px;

	font-weight: 700;

	line-height: 1.4;

	text-decoration: none;

	-webkit-line-clamp: 2;

	-webkit-box-orient: vertical;
}

.best-product-name a:hover {
	color: #62a900;
}


/* =========================================================
   ⭐ OLD PRICE + DISCOUNT
   ========================================================= */

.best-product-price {
	display: flex;

	align-items: center;

	flex-wrap: wrap;

	gap: 5px;

	min-height: 16px;

	margin-bottom: 2px;
}

.best-old-price {
	color: #666666;

	font-size: 10px;

	line-height: 1.2;

	text-decoration: line-through;
}

.best-discount {
	display: inline-flex;
	align-items: center;
	padding: 3px 5px;
	border-radius: 4px;

	background: #E5F2DC;
	color: #356B00;

	font-size: 8px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}


/* =========================================================
   ⭐ CURRENT PRICE
   ========================================================= */

.best-current-price {
	min-height: 19px;

	margin-bottom: 4px;

	color: #427F00;

	font-size: 15px;

	font-weight: 800;

	line-height: 1.25;
}


/* =========================================================
   ⭐ STOCK
   ========================================================= */

.best-product-stock {
	display: flex;

	align-items: center;

	gap: 4px;

	margin-bottom: 5px;

	color: #666666;

	font-size: 10px;

	line-height: 1.3;
}

.best-product-stock strong {
	color: #333;

	font-weight: 700;
}


/* =========================================================
   ⭐ RATING
   ========================================================= */

.best-product-rating {
	display: flex;

	align-items: center;

	min-height: 15px;

	margin-bottom: 8px;

	overflow: hidden;
}

.best-product-rating i {
	flex: 0 0 auto;

	margin-right: 1px;

	color: #ffad00;

	font-size: 10px;
}

.best-review-count {
	min-width: 0;

	margin-left: 4px;

	overflow: hidden;

	color: #666666;

	font-size: 8px;

	line-height: 1;

	text-overflow: ellipsis;

	white-space: nowrap;
}


/* =========================================================
   ⭐ CART BUTTON
   ========================================================= */

.best-product-button {
	display: flex;

	width: 100%;

	margin-top: auto;
}

.best-product-button a {
	display: flex;

	align-items: center;

	justify-content: center;

	width: 100%;

	min-height: 32px;

	padding: 6px 7px;

	border-radius: 18px;

	background: #62a900;

	color: #fff !important;

	font-size: 8px;

	font-weight: 700;

	line-height: 1;

	text-align: center;

	text-decoration: none;

	transition: all .2s ease;
}

.best-product-button a:hover {
	background: #4d8700;

	color: #fff !important;
}

.best-product-button i {
	margin-right: 4px;

	font-size: 10px;

	color: inherit !important;
}


/* =========================================================
   ⭐ FORCE PRODUCT LINK
   ========================================================= */

.best-products-grid
.best-product-card
a {
	text-decoration: none;
}

.best-products-grid
.best-product-card
a:hover {
	text-decoration: none;
}


/* =========================================================
   ⭐ FORCE PRODUCT IMAGE
   ========================================================= */

.best-products-grid
.best-product-card
.best-product-image
img {
	display: block !important;

	width: 100% !important;
	height: 100% !important;

	object-fit: contain !important;

	object-position: center center !important;
}


/* =========================================================
   =========================================================
   LOADING
   =========================================================
   ========================================================= */

.best-products-loading {
	display: none;

	position: absolute;

	top: 0;
	left: 0;
	right: 0;

	z-index: 50;

	padding: 50px 20px;

	align-items: center;

	justify-content: center;

	flex-direction: column;

	background: rgba(255, 255, 255, .88);
}

.best-products-loading.show {
	display: flex;
}

.best-loading-spinner {
	width: 32px;
	height: 32px;

	margin-bottom: 10px;

	border: 3px solid #e5e5e5;

	border-top-color: #62a900;

	border-radius: 50%;

	animation:
		bestCategorySpin
		.7s linear infinite;
}

.best-products-loading span {
	font-size: 12px;

	color: #777;
}

@keyframes bestCategorySpin {

	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}

}


/* =========================================================
   =========================================================
   PAGINATION
   =========================================================
   ========================================================= */

.best-products-pagination {
	width: 100%;

	padding-top: 30px;

	padding-bottom: 10px;
}

.best-pagination-wrap {
	display: flex;

	align-items: center;

	justify-content: center;

	gap: 6px;

	flex-wrap: wrap;
}

.best-pagination-link {
	width: 34px;
	height: 34px;

	display: flex;

	align-items: center;

	justify-content: center;

	border: 1px solid #e5e5e5;

	border-radius: 8px;

	background: #fff;

	color: #555;

	font-size: 12px;

	font-weight: 700;

	text-decoration: none;

	transition: all .2s ease;
}

.best-pagination-link i {
	color: inherit !important;

	transition: color .2s ease;
}

.best-pagination-link:hover {
	background: #62a900;

	border-color: #62a900;

	color: #fff !important;

	text-decoration: none;
}

.best-pagination-link:hover i {
	color: #fff !important;
}

.best-pagination-link:focus {
	background: #62a900;

	border-color: #62a900;

	color: #fff !important;

	text-decoration: none;

	outline: none;
}

.best-pagination-link:focus i {
	color: #fff !important;
}

.best-pagination-link.active {
	background: #62a900;

	border-color: #62a900;

	color: #fff !important;
}

.best-pagination-link.active i {
	color: #fff !important;
}


/* =========================================================
   PAGINATION PREV / NEXT
   ========================================================= */

.best-pagination-prev,
.best-pagination-next {
	font-size: 11px;
}

.best-pagination-prev i,
.best-pagination-next i {
	color: inherit !important;
}

.best-pagination-prev:hover,
.best-pagination-next:hover,
.best-pagination-prev:focus,
.best-pagination-next:focus,
.best-pagination-prev:active,
.best-pagination-next:active {
	background: #62a900 !important;

	border-color: #62a900 !important;

	color: #fff !important;
}

.best-pagination-prev:hover i,
.best-pagination-next:hover i,
.best-pagination-prev:focus i,
.best-pagination-next:focus i,
.best-pagination-prev:active i,
.best-pagination-next:active i {
	color: #fff !important;
}


/* =========================================================
   PAGINATION DOTS
   ========================================================= */

.best-pagination-dots {
	width: 30px;
	height: 34px;

	display: flex;

	align-items: center;

	justify-content: center;

	color: #999;

	font-size: 12px;
}


/* =========================================================
   EMPTY PRODUCTS
   ========================================================= */

.best-products-empty {
	grid-column: 1 / -1;

	width: 100%;

	padding: 60px 20px;

	text-align: center;
}

.best-empty-icon {
	margin-bottom: 10px;

	font-size: 30px;

	color: #bbb;
}

.best-products-empty h3 {
	margin: 0 0 5px;

	font-size: 18px;

	color: #333;
}

.best-products-empty p {
	margin: 0;

	font-size: 12px;

	color: #999;
}

.best-products-empty p strong {
	color: #62a900;
}


/* =========================================================
   =========================================================
   RESPONSIVE
   =========================================================
   ========================================================= */


/* =========================================================
   TABLET
   4 PRODUK PER BARIS
   768px - 991px
   ========================================================= */

@media (max-width: 991px) and (min-width: 768px) {

	.best-products-section {
		padding: 30px 0 8px;
	}


	.best-products-grid {
		grid-template-columns:
			repeat(4, minmax(0, 1fr));

		gap: 12px;
	}


	.best-product-card {
		padding: 6px;

		border-radius: 11px;
	}


	.best-product-image {
		border-radius: 8px;
	}


	.best-category-item {
		min-width: 100px;

		height: 44px;

		padding: 0 11px;

		font-size: 9px;
	}


	.best-category-icon {
		width: 26px;
		height: 26px;

		flex-basis: 26px;
	}


	.best-products-title h2 {
		font-size: 25px;
	}


	.best-product-name a {
		font-size: 11px;
	}


	.best-current-price {
		font-size: 14px;
	}

}


/* =========================================================
   TABLET BESAR
   Jika layar 992 - 1199px
   tetap 4 produk
   ========================================================= */

@media (min-width: 992px) and (max-width: 1199px) {

	.best-products-grid {
		grid-template-columns:
			repeat(4, minmax(0, 1fr));

		gap: 13px;
	}

}


/* =========================================================
   MOBILE
   3 PRODUK PER BARIS
   ========================================================= */

@media (max-width: 767px) {

	.best-products-section {
		padding: 22px 0 6px;
	}


	/* ---------------------------------------------------------
	   CATEGORY MOBILE
	   --------------------------------------------------------- */

	.best-products-category-wrap {
		margin-bottom: 18px;
	}


	.best-category-header {
		align-items: center;

		margin-bottom: 9px;
	}


	.best-category-title {
		font-size: 16px;
	}


	.best-category-description,
	.best-category-arrows {
		display: none;
	}


	.best-products-category {
		gap: 7px;

		padding-bottom: 7px;
	}


	.best-category-item {
		min-width: 82px;

		height: 40px;

		padding: 0 9px;

		gap: 5px;

		border-radius: 9px;

		font-size: 9px;
	}


	.best-category-icon {
		width: 22px;
		height: 22px;

		flex-basis: 22px;
	}


	.best-category-icon i {
		font-size: 9px;
	}


	/* ---------------------------------------------------------
	   ⭐ PRODUCT MOBILE
	   3 PRODUK PER BARIS
	   --------------------------------------------------------- */

	.best-products-grid {
		grid-template-columns:
			repeat(3, minmax(0, 1fr));

		gap: 7px;
	}


	.best-product-card {
		padding: 4px;

		border-radius: 8px;
	}


	.best-product-card:hover {
		transform: none;

		box-shadow: none;
	}


	.best-product-image {
		width: 100%;

		aspect-ratio: 1 / 1;

		border-radius: 6px;
	}


	.best-product-image img {
		width: 100% !important;

		height: 100% !important;

		object-fit: contain !important;
	}


	.best-product-details {
		padding: 6px 1px 1px;
	}


	.best-product-name {
		min-height: 28px;

		margin-bottom: 2px;
	}


	.best-product-name a {
		font-size: 9px;

		line-height: 1.35;
	}


	.best-product-price {
		gap: 2px;

		min-height: 11px;

		margin-bottom: 1px;
	}


	.best-old-price {
		font-size: 6px;
	}


	.best-discount {
		padding: 2px 3px;

		font-size: 5px;
	}


	.best-current-price {
		min-height: 15px;

		margin-bottom: 2px;

		font-size: 11px;

		line-height: 1.2;
	}


	.best-product-stock {
		margin-bottom: 3px;

		font-size: 6px;
	}


	.best-product-rating {
		min-height: 10px;

		margin-bottom: 5px;
	}


	.best-product-rating i {
		font-size: 7px;

		margin-right: 0;
	}


	.best-review-count {
		margin-left: 2px;

		font-size: 5.5px;
	}


	.best-product-button a {
		min-height: 27px;

		padding: 5px 2px;

		border-radius: 15px;

		font-size: 6.5px;
	}


	.best-product-button i {
		margin-right: 2px;

		font-size: 7px;
	}


	.best-wishlist {
		top: 4px;

		right: 4px;

		width: 22px;

		height: 22px;

		font-size: 9px;
	}


	.best-sale-label {
		top: 4px;

		left: 4px;

		padding: 3px 4px;

		font-size: 5px;
	}


	.best-countdown {
		padding: 4px 1px;

		font-size: 5px;
	}


	.best-countdown span {
		padding: 0 2px;
	}


	/* ---------------------------------------------------------
	   PAGINATION MOBILE
	   --------------------------------------------------------- */

	.best-products-pagination {
		padding-top: 20px;
	}


	.best-pagination-link {
		width: 32px;

		height: 32px;

		font-size: 11px;
	}


	.best-pagination-link i {
		color: inherit !important;
	}


	.best-pagination-link:hover i,
	.best-pagination-link:focus i,
	.best-pagination-link:active i {
		color: #fff !important;
	}


	/* ---------------------------------------------------------
	   EMPTY MOBILE
	   --------------------------------------------------------- */

	.best-products-empty {
		padding: 45px 15px;
	}

}


/* =========================================================
   MOBILE KECIL
   <= 380px
   ========================================================= */

@media (max-width: 380px) {

	.best-products-section {
		padding-bottom: 5px;
	}


	.best-products-grid {
		gap: 5px;
	}


	.best-product-card {
		padding: 3px;
	}


	.best-product-name a {
		font-size: 8.5px;
	}


	.best-current-price {
		font-size: 10px;
	}


	.best-product-button a {
		font-size: 6px;
	}

}


/* =========================================================
   =========================================================
   FINAL OVERRIDE
   =========================================================
   ========================================================= */


/* =========================================================
   ACTIVE CATEGORY FORCE
   ========================================================= */

.best-products-category
.best-category-item.active,
.best-products-category
.best-category-item.active:hover,
.best-products-category
.best-category-item.active:focus,
.best-products-category
.best-category-item.active:active {
	background: #3d7a00 !important;

	border-color: #62a900 !important;

	color: #fff !important;
}

.best-products-category
.best-category-item.active
.best-category-text {
	color: #fff !important;
}

.best-products-category
.best-category-item.active
.best-category-icon {
	background: rgba(255, 255, 255, .18) !important;

	color: #fff !important;
}

.best-products-category
.best-category-item.active
.best-category-icon i {
	color: #fff !important;
}


/* =========================================================
   PAGINATION ICON FORCE WHITE
   ========================================================= */

.best-pagination-link.best-pagination-next:hover,
.best-pagination-link.best-pagination-next:focus,
.best-pagination-link.best-pagination-next:active,
.best-pagination-link.best-pagination-prev:hover,
.best-pagination-link.best-pagination-prev:focus,
.best-pagination-link.best-pagination-prev:active {
	background-color: #62a900 !important;

	border-color: #62a900 !important;

	color: #fff !important;
}

.best-pagination-link.best-pagination-next:hover > i,
.best-pagination-link.best-pagination-next:focus > i,
.best-pagination-link.best-pagination-next:active > i,
.best-pagination-link.best-pagination-prev:hover > i,
.best-pagination-link.best-pagination-prev:focus > i,
.best-pagination-link.best-pagination-prev:active > i {
	color: #fff !important;
}


/* =========================================================
   CART FORCE GREEN / WHITE
   ========================================================= */

.best-product-button.text-success a {
	background: #427F00 !important;

	color: #fff !important;
}

.best-product-button.text-success a i {
	color: #fff !important;
}

.best-product-button.text-success a:hover {
	background: #4d8700 !important;

	color: #fff !important;
}

.best-product-button.text-success a:hover i {
	color: #fff !important;
}