/* ==========================================================================
   LOVE COMPUTER - TEMA BLACK PINK NEON MINIMALIST GAMING (MOBILE & ALL DEVICES)
   ========================================================================== */

:root {
  --bg-dark: #07070a;
  --bg-card: rgba(18, 18, 26, 0.75);
  --pink-neon: #ff007f;
  --pink-glow: rgba(255, 0, 127, 0.4);
  --cyan-accent: #00f2fe;
  --tokopedia-color: #03ac0e;
  --shopee-color: #ee4d2d;
  --blibli-color: #0095da;
  --text-main: #f0f0f5;
  --text-muted: #a0a0b0;
  --border-glow: rgba(255, 0, 127, 0.25);
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  background-image: 
    linear-gradient(to bottom, rgba(7, 7, 10, 0.88), rgba(7, 7, 10, 0.95)), 
    url('../img/bg.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- HEADER & NAVIGASI MOBILE/DESKTOP --- */
.main-header {
  background: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 1px;
}

.logo-img { width: 32px; height: 32px; }
.neon-pink { color: var(--pink-neon); text-shadow: 0 0 10px var(--pink-glow); }

.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-item { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 600; transition: all 0.3s; }
.nav-item:hover { color: var(--pink-neon); }
.nav-btn { background: var(--pink-neon); color: #fff !important; padding: 8px 16px; border-radius: 8px; box-shadow: 0 0 12px var(--pink-glow); }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.mobile-menu-toggle .bar {
  width: 25px;
  height: 3px;
  background: var(--pink-neon);
  border-radius: 2px;
}

/* --- LAYOUT UTAMA --- */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 25px 20px;
  flex: 1;
  width: 100%;
}

/* --- BANNER AUTO SLIDESHOW & TOUCH SWIPE --- */
.banner-carousel {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 25px var(--pink-glow);
  margin-bottom: 30px;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.slides-wrapper { position: relative; width: 100%; height: 100%; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease-in-out; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-caption {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 30px;
  background: linear-gradient(transparent, rgba(7, 7, 10, 0.95));
  pointer-events: none;
}
.slide-caption h2 { font-size: 1.8rem; color: #fff; text-shadow: 0 0 10px var(--pink-neon); }
.slide-caption p { color: var(--text-muted); font-size: 0.95rem; }

.slide-dots { position: absolute; bottom: 12px; right: 20px; display: flex; gap: 8px; z-index: 10; }
.dot { width: 10px; height: 10px; background: rgba(255, 255, 255, 0.4); border-radius: 50%; cursor: pointer; transition: all 0.3s; }
.dot.active { background: var(--pink-neon); box-shadow: 0 0 8px var(--pink-neon); width: 24px; border-radius: 10px; }

/* --- CONTROL PANEL (SEARCH, CATEGORY IN FILTER, SORT) --- */
.control-panel { 
  display: flex; 
  flex-wrap: wrap; 
  justify-content: space-between; 
  align-items: center; 
  gap: 15px; 
  margin-bottom: 20px; 
}
.search-form { 
  display: flex; 
  flex: 1; 
  max-width: 650px; 
  gap: 8px; 
}
.search-select {
  background: #12121a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: 8px;
  outline: none;
  font-size: 0.9rem;
}
.search-input {
  flex: 1; 
  padding: 12px 18px; 
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff; 
  outline: none; 
  transition: all 0.3s;
}
.search-input:focus, .search-select:focus { border-color: var(--pink-neon); box-shadow: 0 0 10px var(--pink-glow); }
.btn-search {
  padding: 12px 24px; 
  background: var(--pink-neon); 
  border: none; 
  color: #fff;
  font-weight: bold; 
  border-radius: 8px; 
  cursor: pointer; 
  box-shadow: 0 0 10px var(--pink-glow); 
  transition: 0.3s;
}
.btn-search:hover { opacity: 0.9; transform: translateY(-2px); }

.sort-box { display: flex; align-items: center; gap: 10px; color: var(--text-muted); }
.sort-box select { background: #12121a; color: #fff; border: 1px solid var(--border-glow); padding: 10px 14px; border-radius: 8px; outline: none; }

/* --- CATEGORY BAR (CHIPS) --- */
.category-bar { 
  display: flex; 
  gap: 10px; 
  overflow-x: auto; 
  padding-bottom: 10px; 
  margin-bottom: 30px; 
  -webkit-overflow-scrolling: touch;
}
.category-bar::-webkit-scrollbar { display: none; }
.cat-chip {
  padding: 8px 18px; border-radius: 20px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-muted); text-decoration: none;
  font-size: 0.9rem; white-space: nowrap; transition: all 0.3s;
}
.cat-chip:hover, .cat-chip.active { background: var(--pink-neon); color: #fff; border-color: var(--pink-neon); box-shadow: 0 0 12px var(--pink-glow); }

/* --- PRODUCT GRID --- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.product-card {
  background: var(--bg-card); border: 1px solid var(--border-glow); border-radius: 12px;
  overflow: hidden; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; flex-direction: column; transition: all 0.3s ease;
}
.product-card:hover { transform: translateY(-5px); border-color: var(--pink-neon); box-shadow: 0 8px 20px var(--pink-glow); }

.card-img-wrapper { position: relative; width: 100%; height: 190px; background: #000; overflow: hidden; cursor: pointer; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card-img-wrapper:hover img { transform: scale(1.08); }
.img-overlay {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); opacity: 0;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.85rem; font-weight: 600; transition: opacity 0.3s;
}
.card-img-wrapper:hover .img-overlay { opacity: 1; }

.card-body { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; }
.badge { align-self: flex-start; font-size: 0.7rem; font-weight: bold; color: var(--cyan-accent); background: rgba(0, 242, 254, 0.1); border: 1px solid var(--cyan-accent); padding: 2px 8px; border-radius: 4px; margin-bottom: 8px; text-transform: uppercase; }
.card-title { font-size: 1rem; color: #fff; margin-bottom: 6px; }
.card-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 15px; flex-grow: 1; }
.price { font-weight: bold; color: var(--pink-neon); font-size: 1.1rem; margin-bottom: 12px; }

.card-actions { display: flex; gap: 8px; }
.btn-details {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 6px; text-decoration: none;
  font-size: 0.8rem; font-weight: bold; background: transparent; color: var(--cyan-accent); border: 1px solid var(--cyan-accent); transition: all 0.3s;
}
.btn-details:hover { background: var(--cyan-accent); color: #000; box-shadow: 0 0 10px rgba(0, 242, 254, 0.4); }

.empty-state { text-align: center; padding: 50px 0; color: var(--text-muted); grid-column: 1 / -1; }

/* --- DETAILS PAGE --- */
.details-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--bg-card); padding: 30px; border-radius: 16px; border: 1px solid var(--border-glow); }
.details-img-box { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-glow); height: 380px; }
.details-img-box img { width: 100%; height: 100%; object-fit: cover; }
.details-info h1 { font-size: 1.8rem; margin-bottom: 10px; color: #fff; }
.details-info .price { font-size: 1.8rem; margin: 15px 0; display: block; }
.details-info .desc-full { color: var(--text-muted); line-height: 1.6; margin-bottom: 25px; }

.marketplace-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.btn-market { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-radius: 8px; color: #fff; text-decoration: none; font-weight: bold; transition: all 0.3s; }
.btn-shopee { background: var(--shopee-color); }
.btn-tokopedia { background: var(--tokopedia-color); }
.btn-blibli { background: var(--blibli-color); }
.btn-wa { background: #25d366; }
.btn-market:hover { opacity: 0.9; transform: translateY(-2px); }

/* --- PAGINATION --- */
.pagination-wrapper { display: flex; justify-content: center; margin-top: 35px; }
.pagination { display: flex; list-style: none; gap: 8px; }
.pagination a { padding: 8px 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-glow); color: var(--text-main); text-decoration: none; border-radius: 6px; transition: 0.3s; }
.pagination a:hover, .pagination a.active { background: var(--pink-neon); color: #fff; box-shadow: 0 0 10px var(--pink-glow); }

/* --- LIGHTBOX MODAL (STORY TAP KIRI/KANAN & SWIPE FRIENDLY) --- */
.lightbox-modal { 
  display: none; 
  position: fixed; 
  inset: 0; 
  z-index: 999; 
  background: rgba(0, 0, 0, 0.92); 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px); 
  justify-content: center; 
  align-items: center; 
  flex-direction: column;
  user-select: none;
  touch-action: pan-y pinch-zoom;
}
.lightbox-modal.active { display: flex; }

.lightbox-img-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 90%;
  max-height: 80vh;
  cursor: pointer;
}

.lightbox-content { 
  max-width: 100%; 
  max-height: 80vh; 
  object-fit: contain;
  border-radius: 12px; 
  border: 1px solid var(--pink-neon); 
  box-shadow: 0 0 30px var(--pink-glow); 
  pointer-events: none;
}

.lightbox-caption { 
  margin-top: 15px; 
  color: #fff; 
  background: rgba(0, 0, 0, 0.7); 
  padding: 8px 18px; 
  border-radius: 20px; 
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.lightbox-close { 
  position: absolute; 
  top: 20px; 
  right: 25px; 
  color: #fff; 
  font-size: 2.2rem; 
  cursor: pointer; 
  z-index: 1000;
  line-height: 1;
}

/* --- MEDIA QUERIES (RESPONSIVE SUPPORT ALL DEVICES) --- */
@media (max-width: 768px) {
  .header-container { padding: 12px 15px; }
  .mobile-menu-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(7, 7, 10, 0.95);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border-glow);
  }
  .nav-links.open { display: flex; }
  
  .banner-carousel { height: 200px; border-radius: 12px; margin-bottom: 20px; }
  .slide-caption { padding: 15px; }
  .slide-caption h2 { font-size: 1.2rem; }
  .slide-caption p { font-size: 0.8rem; }
  
  .control-panel { flex-direction: column; align-items: stretch; gap: 12px; }
  .search-form { flex-direction: column; max-width: 100%; }
  .sort-box { justify-content: space-between; }
  .sort-box select { flex: 1; }
  
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .card-img-wrapper { height: 130px; }
  .card-body { padding: 10px; }
  .card-title { font-size: 0.9rem; }
  .price { font-size: 1rem; }
  
  .details-wrapper { grid-template-columns: 1fr; gap: 20px; padding: 18px; }
  .details-img-box { height: 260px; }
  
  .lightbox-img-wrapper { max-width: 95%; max-height: 75vh; }
  .lightbox-close { top: 15px; right: 20px; font-size: 2rem; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .banner-carousel { height: 160px; }
}