body {
	font-family: 'Inter', sans-serif;
	transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom scrollbar for category wrapper */
#category-wrapper::-webkit-scrollbar {
	height: 6px;
}

#category-wrapper::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 4px;
}

.dark #category-wrapper::-webkit-scrollbar-track {
	background: #334155;
}

#category-wrapper::-webkit-scrollbar-thumb {
	background-color: #10b981;
	border-radius: 4px;
}

/* For Firefox */
#category-wrapper {
	scrollbar-width: thin;
	scrollbar-color: #10b981 #f1f5f9;
}

.dark #category-wrapper {
	scrollbar-color: #10b981 #334155;
}

/* Cart transition */
.cart-transition {
	transition: all 0.3s ease-in-out;
}

/* Hide/show cart animation */
.cart-hidden {
	transform: translateY(100%);
	opacity: 0;
	pointer-events: none;
}

.cart-visible {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

/* Overlay */
.overlay-hidden {
	opacity: 0;
	pointer-events: none;
}

.overlay-visible {
	opacity: 1;
	pointer-events: auto;
}

/* Gradient text */
.gradient-text {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* Dark mode gradient text */
.dark .gradient-text {
	background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* Custom animation */
@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
	animation: fadeIn 0.3s ease-out forwards;
}

@keyframes bounceIn {
	0% { transform: scale(0.3); opacity: 0; }
	50% { transform: scale(1.05); }
	70% { transform: scale(0.9); }
	100% { transform: scale(1); opacity: 1; }
}

.animate-bounceIn {
	animation: bounceIn 0.3s ease-out forwards;
}

/* Prevent body scroll when cart is open */
body.cart-open {
	overflow: hidden;
	position: fixed;
	width: 100%;
}

/* Fixed cart button styles */
.fixed-cart-button {
	transition: all 0.3s ease-in-out;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dark .fixed-cart-button {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fixed-cart-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* Collapse transition */
.collapse-transition {
	transition: max-height 0.3s ease-in-out;
	overflow: hidden;
}

/* Tambahkan di CSS yang sudah ada */
.fixed-cart-detail-swipe {
	transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

#fixed-cart-detail {
	transition: max-height 0.3s ease-in-out, transform 0.2s ease-out, opacity 0.2s ease-out;
	transform-origin: bottom center;
}

/* QR Display */
.qr-display {
	border: 8px solid white;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dark .qr-display {
	border: 8px solid #1e293b;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#qrcode {
	min-height: 120px;
	min-width: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	border-radius: 12px;
	overflow: hidden;
	padding: 8px;
}

.dark #qrcode {
	background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

/* Tombol download lebih menonjol */
button[onclick="downloadQRIS()"] {
	background: linear-gradient(to right, #10b981, #059669);
	color: white;
	border: none;
	font-weight: 600;
}

button[onclick="downloadQRIS()"]:hover {
	background: linear-gradient(to right, #059669, #047857);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* Featured Products Grid */
.grid-cols-1 {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Gap responsive */
.gap-3 {
	gap: 12px;
}

@media (min-width: 640px) {
	.gap-3 {
		gap: 16px;
	}
}

/* Product card responsive height */
.featured-product-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.featured-product-card img {
	height: 150px;
	object-fit: cover;
}

@media (min-width: 640px) {
	.featured-product-card img {
		height: 180px;
	}
}

@media (min-width: 768px) {
	.featured-product-card img {
		height: 200px;
	}
}

/* Featured Slider Dots */
.featured-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #d1d5db;
	cursor: pointer;
	transition: all 0.3s ease;
}

.featured-dot.active {
	width: 24px;
	border-radius: 12px;
	background-color: #3b82f6; /* Primary color */
}

.dark .featured-dot {
	background-color: #4b5563;
}

.dark .featured-dot.active {
	background-color: #60a5fa;
}

/* Map Styles */
#locationMap {
	touch-action: pan-x pan-y;
}

.leaflet-container {
	font-family: 'Inter', sans-serif;
	font-size: 12px;
}

.leaflet-control-zoom {
	margin-top: 60px !important;
}

.custom-marker {
	background-color: #10b981;
	border-radius: 50%;
	border: 3px solid white;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.custom-marker::after {
	content: '';
	width: 12px;
	height: 12px;
	background-color: white;
	border-radius: 50%;
}

/* Modal responsive */
@media (max-width: 640px) {
	#locationModal > div {
		margin: 0;
		width: 100%;
		height: 100vh;
		max-height: 100vh;
		border-radius: 0;
	}
	
	#locationMap {
		height: 50vh;
	}
}

/* Loading indicator untuk geolocation */
.current-location-marker {
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.2); opacity: 0.7; }
	100% { transform: scale(1); opacity: 1; }
}

#locationModal {
	z-index: 100 !important;
}

/* Dark mode toggle button */
#darkModeToggle {
	position: relative;
	width: 48px;
	height: 24px;
	border-radius: 12px;
	background: linear-gradient(to right, #d1d5db, #9ca3af);
	cursor: pointer;
	transition: all 0.3s ease;
}

#darkModeToggle.active {
	background: linear-gradient(to right, #3b82f6, #8b5cf6);
}

#darkModeToggle .toggle-circle {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: white;
	transition: all 0.3s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#darkModeToggle.active .toggle-circle {
	left: 26px;
	background: #fbbf24;
}

/* Navbar dark mode */
.dark nav {
	background-color: #1e293b !important;
	border-color: #334155 !important;
}

/* Main content dark mode */
.dark main {
	background-color: #0f172a !important;
	color: #f1f5f9 !important;
}

/* Cards dark mode */
.dark .bg-white {
	background-color: #1e293b !important;
	border-color: #334155 !important;
}

.dark .bg-gray-50 {
	background-color: #1e293b !important;
}

.dark .bg-gray-100 {
	background-color: #334155 !important;
}

.dark .text-gray-800 {
	color: #f1f5f9 !important;
}

.dark .text-gray-600 {
	color: #cbd5e1 !important;
}

.dark .text-gray-500 {
	color: #94a3b8 !important;
}

.dark .text-gray-400 {
	color: #94a3b8 !important;
}

.dark .border-gray-200 {
	border-color: #334155 !important;
}

.dark .border-gray-300 {
	border-color: #475569 !important;
}

.dark .bg-blue-50 {
	background-color: #1e3a8a !important;
}

.dark .bg-blue-100 {
	background-color: #1e40af !important;
}

.dark .text-blue-600 {
	color: #60a5fa !important;
}

.dark .border-blue-200 {
	border-color: #1e40af !important;
}

/* Input fields dark mode */
.dark input,
.dark textarea,
.dark select {
	background-color: #334155 !important;
	color: #f1f5f9 !important;
	border-color: #475569 !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
	color: #94a3b8 !important;
}

/* Fixed cart dark mode */
.dark #fixed-cart-container {
	background-color: #1e293b !important;
	border-color: #334155 !important;
}

/* QR Card dark mode */
.dark .bg-gradient-to-r {
	background: linear-gradient(to right, #1e293b, #0f172a) !important;
}

/* Leaflet dark mode */
.dark .leaflet-container {
	background: #334155 !important;
}

.dark .leaflet-control-zoom a {
	background-color: #1e293b !important;
	color: #f1f5f9 !important;
	border-color: #475569 !important;
}

.dark .leaflet-control-zoom a:hover {
	background-color: #334155 !important;
}

/* SweetAlert2 dark mode */
.dark .swal2-popup {
	background-color: #1e293b !important;
	color: #f1f5f9 !important;
}

.dark .swal2-title,
.dark .swal2-html-container {
	color: #f1f5f9 !important;
}

/* Modal dark mode */
.dark #locationModal > div {
	background-color: #1e293b !important;
	color: #f1f5f9 !important;
	border-color: #334155 !important;
}

/* Dropdown dark mode */
.dark .dropdown-content {
	background-color: #1e293b !important;
	border-color: #334155 !important;
	box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}

.dark .dropdown-item:hover {
	background-color: #334155 !important;
}

/* Loading spinner dark mode */
.dark .animate-spin {
	border-top-color: #10b981 !important;
	border-bottom-color: #10b981 !important;
}

/* Product card shadow dark mode */
.dark .shadow-soft {
	box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

.dark .shadow-medium {
	box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
}

.transition-theme {
	transition: background-color .3s ease,
	border-color .3s ease,
	color .3s ease;
}


/* Exclude some elements from transition */
img, 
video, 
iframe,
canvas,
svg,
.leaflet-container,
#qrcode canvas {
	transition: none !important;
}
 
/* Untuk solusi horizontal scroll */
.btn-scroll-container {
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.btn-scroll-container::-webkit-scrollbar {
	height: 4px;
}

.btn-scroll-container::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 2px;
}

.btn-scroll-container::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 2px;
}

.btn-scroll-container::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

/* Untuk responsive table */
@media (max-width: 768px) {
	.action-buttons .btn {
		padding: 2px 4px;
		font-size: 10px;
	}
}

/* Custom DataTables styling with Tailwind */
.dataTables_wrapper .dataTables_length select {
	background-image: none;
	padding: 0.5rem 2.5rem 0.5rem 1rem;
}

.dataTables_wrapper .dataTables_filter input {
	padding: 0.5rem 1rem;
	margin-left: 0.5rem;
}

.select2-container--default .select2-selection--single {
	border: 1px solid #d1d5db;
	border-radius: 0.375rem;
	height: 42px;
	padding: 6px 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 40px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
	border: 1px solid #d1d5db;
	border-radius: 0.375rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: #3b82f6;
	color: white;
}

/* Responsive design untuk mobile */
@media (max-width: 768px) {
	.select2-container {
		width: 100% !important;
	}
}

.select2-container--default .select2-results__option:hover {
	background-color: #f3f4f6;
	color: white;
}

.select2-selection__rendered .item-flex {
	display: flex;
	justify-content: space-between;
	width: 100%;
	align-items: center;
}

.select2-results__option .item-flex {
	display: flex;
	justify-content: space-between;
	width: 100%;
}

/* Force SweetAlert button styling */
.swal2-confirm, .swal2-cancel {
	opacity: 1 !important;
	visibility: visible !important;
	color: white !important;
	font-weight: bold !important;
}

.swal2-confirm {
	background-color: #3085d6 !important;
}

.swal2-cancel {
	background-color: #d33 !important;
}

/* Ensure buttons are always visible */
.swal2-actions {
	opacity: 1 !important;
	visibility: visible !important;
}

/* Batasi jumlah tombol angka halaman maksimal 5 */
.dataTables_wrapper .dataTables_paginate .paginate_button {
	display: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next,
.dataTables_wrapper .dataTables_paginate .paginate_button.first,
.dataTables_wrapper .dataTables_paginate .paginate_button.last,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current + .paginate_button,
.dataTables_wrapper .dataTables_paginate .paginate_button.current + .paginate_button + .paginate_button,
.dataTables_wrapper .dataTables_paginate .paginate_button.current + .paginate_button + .paginate_button + .paginate_button,
.dataTables_wrapper .dataTables_paginate .paginate_button.current + .paginate_button + .paginate_button + .paginate_button + .paginate_button {
	display: inline-block;
}

/* New Styling Improvements */
.sidebar-gradient {
	background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.sidebar-logo {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
}

.menu-item {
	transition: all 0.3s ease;
	border-radius: 0.5rem;
	margin: 0.25rem 0.5rem;
}

.menu-item:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: translateX(5px);
}

.menu-item.active {
	background: rgba(255, 255, 255, 0.15);
	border-left: 4px solid var(--accent-color);
}

.header-shadow {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.user-avatar {
	transition: all 0.3s ease;
}

.user-avatar:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.notification-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	background: #ef4444;
	color: white;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	font-size: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	border: 2px solid white;
}

#notificationDropdown {
	animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Custom scrollbar for dropdown */
#notificationDropdown .max-h-96::-webkit-scrollbar {
	width: 4px;
}

#notificationDropdown .max-h-96::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 2px;
}

#notificationDropdown .max-h-96::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 2px;
}

#notificationDropdown .max-h-96::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

.mobile-menu-transition {
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-card {
	background: white;
	border-radius: 0.75rem;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
	transition: all 0.3s ease;
}

.content-card:hover {
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.loading-spinner {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.fade-in {
	animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}
.dataTables_wrapper .dataTables_filter input {
	border: 1px solid #d1d5db;
	padding: 0.5rem;
	border-radius: 0.375rem;
}
.dataTables_wrapper .dataTables_length select {
	border: 1px solid #d1d5db;
	padding: 0.25rem;
	border-radius: 0.375rem;
}
.dt-buttons button {
	background-color: #3b82f6;
	color: white;
	padding: 0.5rem 1rem;
	border-radius: 0.375rem;
	margin-right: 0.5rem;
}
.dt-buttons button:hover {
	background-color: #2563eb;
}

.mobile-menu {
	transform: translateX(-100%);
	transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
	transform: translateX(0);
}

.mobile-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease-in-out;
	z-index: 40;
}

.mobile-menu-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Smooth transition untuk infinite scroll */
#scroll-sentinel {
    transition: all 0.3s ease;
}

/* Pull to refresh indicator */
.refresh-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.refresh-indicator.active {
    transform: translateY(0);
}

/* Loading skeleton untuk better UX */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}