.content-wrapper {
	padding-top: 55px;
	background-color: #fff !important;
}

.no-data {
	color: #666; /* abu-abu lembut */
	font-size: 1rem;
	font-weight: 500;
	text-align: center;
	padding: 40px 20px; /* cukup lega */
	border: 1px dashed #aaa; /* garis putus-putus tipis */
	border-radius: 8px;
	background-color: #f9f9f9;
	margin: 20px auto;
	max-width: 400px; /* biar nggak kepanjangan */
}

.navbar-left,
.navbar-right {
	flex: 1;
}

.navbar-center {
	flex: 2; /* bagian tengah lebih lebar */
}

.filter-nav {
	height: 60px;
	gap: 10px;
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: thin;
	-ms-overflow-style: none;
	padding: 0 8px;
	justify-content: center; /* default untuk desktop */
}

.filter-nav::-webkit-scrollbar {
	height: 6px;
}

.filter-nav::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

/* Mobile: mulai dari kiri */
@media (max-width: 600px) {
	.filter-nav {
		justify-content: flex-start;
	}
}

/* Posisi icon search */
.search-icon {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: #666;
	font-size: 14px;
	pointer-events: none; /* biar klik tetap ke input */
}

/* Biar ada ruang untuk icon */
.form-control-navbar {
	padding-left: 32px !important;
}

/* Wrapper */
.select2-container {
	font-family: inherit;
}

/* Select box */
.select2-container .select2-selection--single {
	height: 38px;
	border-radius: 8px;
	border: 1px solid #ccc;
	display: flex;
	align-items: center;
	padding: 0 40px 0 10px; /* kasih ruang buat arrow kanan */
	background-color: #fff;
	transition: all 0.2s ease-in-out;
	cursor: pointer;
}

/* Text */
.select2-container--default
	.select2-selection--single
	.select2-selection__rendered {
	line-height: 36px;
	color: #222;
	font-size: 14px;
	padding: 0;
}

/* Dropdown arrow – biar center tanpa geser */
.select2-container--default
	.select2-selection--single
	.select2-selection__arrow {
	position: absolute;
	top: 45% !important;
	right: 10px;
	transform: translateY(-50%);
	pointer-events: none;
}

/* Hover */
.select2-container--default .select2-selection--single:hover {
	border-color: #999;
	background-color: #f8f8f8;
}

/* Focus (hilangkan outline biru bawaan browser) */
.select2-container--default .select2-selection--single:focus,
.select2-container--default
	.select2-selection--single.select2-selection--focus {
	outline: none !important;
	border-color: #555 !important; /* abu gelap */
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
	background-color: #f0f0f0;
}

/* Dropdown menu */
.select2-dropdown {
	border-radius: 8px;
	border: 1px solid #ccc;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
	background-color: #fff;
	font-size: 14px;
	margin-top: 2px; /* biar ada jarak kecil, tidak nempel */
}

/* Item */
.select2-results__option {
	padding: 6px 10px;
	color: #222;
	transition: background 0.2s ease-in-out;
}

/* Hovered item */
.select2-results__option--highlighted {
	background-color: #ddd !important;
	color: #000 !important;
}

/* Selected item */
.select2-results__option[aria-selected="true"] {
	background-color: #bbb !important;
	color: #fff !important;
}

.product-container {
	width: 100%;
	max-width: 100vw;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	justify-content: center;
	padding: 20px;
	background-color: #fff !important;
}

.product-item {
	cursor: pointer;
	width: calc(16.66% - 15px);
	border: 1px solid #eee;
	text-align: left;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	transition: transform 0.25s ease-in-out;
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow: hidden;
	padding: 12px;
}

.product-item:hover {
	transform: translateY(-5px);
}

/* --- gambar square 1:1 crop --- */
.product-item img {
	width: 100%;
	aspect-ratio: 1/1; /* menjaga rasio 1:1 */
	object-fit: cover; /* crop, bukan stretch */
	border-radius: 10px;
}

/* --- info produk --- */
.product-info {
	margin-top: 10px;
	width: 100%;
}

.product-name {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.product-name .brand {
	font-size: 12px;
	color: #777;
	font-weight: 400;
}

.product-name .name {
	font-size: 14px;
	font-weight: 600;
	color: #222;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2; /* max 2 baris */
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	height: calc(1.4em * 2); /* pas 2 baris */
}

.product-stock {
	font-size: 13px;
	margin-top: 4px;
	color: #444;
}

.product-price {
	font-size: 14px;
	font-weight: bold;
	color: #28a745;
	margin-top: 6px;
}

/* Foto tetap konsisten */
.modal-img-wrapper {
	width: 100%;
	height: 350px; /* tinggi konsisten */
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 8px;
	background: #f9f9f9;
}

.modal-img-wrapper img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain; /* selalu tampil utuh */
}

/* Harga */
.modal-product-price {
	font-size: 2.2rem;
	font-weight: 700;
	color: #28a745;
	margin-bottom: 10px;
}

/* Nama produk */
.modal-product-name {
	font-size: 1.6rem;
	font-weight: 600;
	margin-bottom: 20px; /* jarak lebih besar ke detail */
}

/* Struktur detail flex agar sejajar */
.modal-product-detail {
	display: flex;
	align-items: center;
	margin-bottom: 4px;
	font-size: 1.4rem;
}

.modal-product-detail .label {
	min-width: 60px; /* jaga lebar label */
	font-weight: 600;
}

.modal-product-detail .colon {
	width: 12px; /* titik dua fix posisinya */
	text-align: center;
	font-weight: 600;
}

.modal-product-detail .value {
	flex: 1;
}

@media (max-width: 600px) and (orientation: portrait) {
	.navbar-left {
		flex: 0 0 33.33%; /* 1/3 */
		max-width: 33.33%;
	}

	.navbar-center {
		flex: 0 0 66.67%; /* 2/3 */
		max-width: 66.67%;
	}

	/* Pastikan form search penuh di kolomnya */
	.navbar-center form {
		width: 100% !important;
		max-width: 100% !important;
	}

	.navbar-center input {
		width: 100%;
		padding-right: 35px; /* ruang buat icon */
		border-radius: 6px !important;
	}

	/* Search button mobile */
	.navbar-center .search-btn {
		position: absolute;
		right: 8px;
		top: 50%;
		transform: translateY(-50%);
		border: none;
		background: transparent;
		color: #666;
		padding: 0;
		cursor: pointer;
	}

	.product-item {
		width: calc(50% - 10px);
		padding: 10px;
	}

	.product-name .name {
		font-size: 12px;
		height: calc(1.4em * 2);
	}

	.product-stock {
		font-size: 12px;
	}

	.product-price {
		font-size: 12px;
	}

	.modal-product-detail {
		font-size: 1.2rem !important;
	}

	.modal-product-detail .label {
		min-width: 50px;
		margin-right: 4px;
	}

	.modal-product-detail .colon {
		margin-right: 6px;
	}

	.modal-img-wrapper {
		height: 220px;
	}
}

/* === Mobile Landscape (5 per baris) === */
@media (max-width: 900px) and (orientation: landscape) {
	.product-item {
		width: calc(20% - 10px);
		padding: 10px;
	}

	.product-name .name {
		font-size: 12px;
		height: calc(1.4em * 2);
	}

	.product-stock {
		font-size: 12px;
	}

	.product-price {
		font-size: 12px;
	}

	.modal-product-detail {
		font-size: 1.1rem !important;
	}

	.modal-body .row {
		display: flex;
		flex-direction: row;
		align-items: flex-start;
	}

	.modal-body .col-md-5,
	.modal-body .col-md-7 {
		flex: 1;
		max-width: 50%;
	}

	.modal-img-wrapper {
		height: 180px;
	}

	.modal-product-price {
		font-size: 1.5rem !important;
	}

	.modal-product-name {
		font-size: 1.2rem !important;
	}
}

/* === Tablet Portrait (5 per baris) === */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
	.product-item {
		width: calc(20% - 10px);
		padding: 10px;
	}

	.product-name .name {
		font-size: 13px;
	}

	.product-stock {
		font-size: 13px;
	}

	.product-price {
		font-size: 13px;
	}
}

/* === Tablet Landscape (6 per baris) === */
@media (min-width: 900px) and (max-width: 1200px) and (orientation: landscape) {
	.product-item {
		width: calc(16.66% - 10px);
		padding: 10px;
	}

	.product-name .name {
		font-size: 13px;
	}

	.product-stock {
		font-size: 13px;
	}

	.product-price {
		font-size: 13px;
	}
}

/* Tombol Scroll ke Atas */
#scrollTopBtn {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	font-size: 20px;
	cursor: pointer;
	display: none;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#scrollTopBtn:hover {
	background-color: #0056b3;
}

#loading {
	display: none;
	text-align: center;
	padding: 10px;
	font-size: 16px;
	color: #000000;
}

#product-container:has(.no-data) {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 200px; /* tinggi minimum biar keliatan */
}
