:root {
	--primary: #1e3a8a;
	--primary-dark: #1e293b;
	--accent: #2563eb;
	--shopee: #ef4b2f;
	--tokopedia: #03ac03;
	--tiktok: #010101;
	--whatsapp: #28c96c;
	--bg-color: #f4f6f9;
	--card-bg: #ffffff;
	--text-main: #1e293b;
	--text-muted: #64748b;
	--border-color: #e2e8f0;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: Arial, sans-serif;
}

body {
	background-color: var(--bg-color);
	color: var(--text-main);
	line-height: 1.5;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* Badges */
.badge-wa {
	background-color: var(--whatsapp);
	color: #fff;
	padding: 6px 16px 6px 36px;
	border-radius: 30px;
	font-weight: 500;
	position: relative;
	display: inline-flex;
	align-items: center;
}
.badge-wa i { position: absolute; left: 12px; }

.badge-shopee {
	background-color: var(--shopee);
	color: #fff;
	padding: 6px 16px 6px 36px;
	border-radius: 30px;
	font-weight: 500;
	position: relative;
	display: inline-flex;
	align-items: center;
}
.badge-shopee i { position: absolute; left: 12px; }

/* Header / Navbar */
header {
	background-color: #ffffff;
	border-bottom: 1px solid var(--border-color);
	width: 100%;
	position: sticky;
	top: 0;
	z-index: 99;
}
.header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
}
.logo-area {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: bold;
	color: var(--primary);
	font-size: 1.2rem;
	letter-spacing: 0.5px;
}
.logo-area span { color: #f97316; }

/* Navigation Menu & Dropdown */
.nav-menu {
	display: flex;
	align-items: center;
	gap: 25px;
	list-style: none;
	font-size: 0.95rem;
	font-weight: 500;
}
.nav-item {
	position: relative;
}
.nav-link {
	color: var(--text-main);
	padding: 8px 0;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: color 0.2s;
	cursor: pointer;
}
.nav-link:hover {
	color: var(--accent);
}

/* Dropdown Submenu */
.dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	background: #ffffff;
	border: 1px solid var(--border-color);
	box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
	border-radius: 8px;
	list-style: none;
	min-width: 180px;
	padding: 8px 0;
	display: none;
	z-index: 100;
}
.nav-item:hover .dropdown-menu {
	display: block;
}
.dropdown-item a {
	display: block;
	padding: 8px 16px;
	color: var(--text-main);
	font-size: 0.9rem;
	transition: background 0.2s, color 0.2s;
}
.dropdown-item a:hover {
	background: #f1f5f9;
	color: var(--accent);
}

.header-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Perbarui CSS Modal Gallery & Slider */
.modal-top-gallery {
    position: relative;
    width: 100%;
    height: 320px; /* Atur tinggi kontainer galeri agar proporsional */
    background: #fff; /* Warna latar belakang gelap untuk area gambar */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.gallery-slider {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Memastikan gambar pas di dalam kotak tanpa terpotong/distorsi */
    display: block;
    margin: auto;
}

#productModal .action-buttons { margin:0 auto; }

/* Footer */
footer {
	background-color: #ffffff;
	border-top: 1px solid var(--border-color);
	width: 100%;
	margin-top: auto;
}
.footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 30px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}
.footer-left { display: flex; flex-direction: column; gap: 5px; }
.footer-logo { font-weight: bold; color: var(--primary); font-size: 1.1rem; }
.footer-copy { font-size: 0.85rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 15px; flex-wrap: wrap; font-size: 0.9rem; }


/* Product Grid */
.product-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
	margin-bottom: 30px;
}
@media(max-width:768px) {
	.product-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}
@media(max-width:430px) { /* Dinaikkan dari 428 ke 430 agar mencakup Xiaomi Redmi Note 12 */
	.product-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media(max-width:380px) { /* Diturunkan sedikit untuk HP yang layarnya lebih kecil */
	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
.product-card {
	background: #ffffff;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
	transition: transform 0.2s, box-shadow 0.2s;
	cursor: pointer;
}
.product-card:hover { 
	transform: translateY(-4px); 
	box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.product-img {
	width: 100%;
	height: 150px;
	background-color: #fff;
	object-fit: contain;
}
.product-body {
	padding: 14px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}
.product-title { 
	font-size: 0.9rem; 
	font-weight: bold; 
	color: var(--text-main); 
	margin-bottom: 8px; 
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.product-desc { font-size: 0.9rem; color: #000; margin-bottom: 10px; flex-grow: 1; }
.product-desc span { display:block; font-size: 0.7rem; color: gray; margin-bottom:3px; }
.product-footer { 
	display: flex; 
	justify-content: space-between; 
	align-items: center; 
	margin-top: auto; 
}
.product-price { font-size: 0.95rem; font-weight: bold; color: #ee4d2d; }
.btn-detail {
	background-color: var(--primary);
	color: white;
	border: none;
	padding: 6px 12px;
	font-size: 0.75rem;
	border-radius: 4px;
	cursor: pointer;
}

/* Pagination */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-bottom: 30px;
	font-size: 0.9rem;
}
.pagination button {
	padding: 8px 14px;
	border: 1px solid var(--border-color);
	background: #fff;
	color: var(--text-main);
	border-radius: 6px;
	cursor: pointer;
	font-weight: bold;
}
.pagination button.active {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}
.pagination button:hover:not(.active):not(:disabled) {
	background: #f1f5f9;
}
.pagination button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}


/* Modal Popup 3D View */
.modal-overlay {
	position: fixed;
	top: 0; left: 0; width: 100%; height: 100%;
	background: rgba(0, 0, 0, 0.7);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	padding: 15px;
}
.modal-container {
	background: #ffffff;
	width: 450px;
	max-width: 100%;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
	box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3);
}
.modal-close {
	position: absolute;
	top: 10px; right: 10px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	width: 32px; height: 32px;
	border-radius: 50%;
	font-size: 1rem;
	cursor: pointer;
	color: var(--text-main);
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.modal-top-3d {
	width: 100%;
	background: var(--primary-dark);
	position: relative;
	height: 280px;
}

.modal-tag {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Mengatur posisi ke tengah secara horizontal */
  align-items: center;
  gap: 8px; /* Jarak antar tag */
  margin-bottom:40px;
}

.modal-tag a {
  display: inline-block;
  padding: 3px 8px;
  background-color: #f1f3f5; /* Warna latar belakang tag */
  color: #333333; /* Warna teks */
  border: 1px solid #dee2e6; /* Garis tepi tipis (opsional) */
  border-radius: 20px; /* Membuat sudutnya melengkung/pill shape */
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Efek saat kursor diarahkan ke tag */
.modal-tag a:hover {
  background-color: #ee4d2d; /* Contoh menggunakan warna merah senada */
  color: #ffffff;
  border-color: #ee4d2d;
}
#canvas-container { width: 100%; height: 100%; }
#preview-thumb {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	z-index: 5;
	transition: opacity 0.3s ease;
}
.loading-text {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	color: #ffffff;
	font-size: 0.85rem;
	pointer-events: none;
	z-index: 10;
}
.modal-bottom-details {
	width: 100%;
	padding: 20px;
	background: #ffffff;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.modal-title {
	text-align: center;
	font-size: 1.1rem;
	font-weight: bold;
	color: var(--text-main);
}
.action-buttons {
	display: flex;
	gap: 10px;
}
.btn-wa-modal {
	font-weight: bold;
	font-size: 0.75rem; /* Disesuaikan agar pas di perangkat mobile */
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	flex: 1; /* Lebar fleksibel sama rata */
	background-color: #28c96c;
	color: #fff;
	padding: 10px;
	border-radius: 30px;
	text-align: center;
}
.btn-shopee-modal {
	font-weight: bold;
	font-size: 0.75rem; /* Disesuaikan agar pas di perangkat mobile */
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	flex: 1; /* Lebar fleksibel sama rata */
	background-color: #ef4b2f;
	color: #fff;
	padding: 10px;
	border-radius: 30px;
	text-align: center;
}
.btn-shopee-modal img, .btn-wa-modal img { height: 30px; margin-top: -5px;  }

@media (max-width: 900px) {
	/*.nav-menu { display: none; }*/
	.slide-content h1 { font-size: 1.7rem; }
	.hero-slider { height: 350px; }
	.about-section { padding: 25px 15px; }
	.gallery-item { flex: 0 0 calc(50% - 10px); min-width: 220px; }
}
