/* ---- css/4-halaman-utama.css ----- */

/* ========== KONTEN UTAMA ========== */
.horizontal-container { position: absolute; top: 190px; left: 0; width: calc(100vw * 7); height: calc(100vh - 172px); display: flex; will-change: transform; overflow: hidden; -webkit-overflow-scrolling: touch; touch-action: pan-x; }    /* Container horizontal untuk swipe antar brand */

.brand-page {
  width: 100vw;
  height: 100%;
  flex: 0 0 auto;
  position: relative;
}      

/* Setiap halaman per brand (filter/sparepart) */

.vertical-container {
  width: 100%;
  height: 100%;
  overflow-y: auto !important;
  padding: 5px;
  display: block;
  align-content: flex-start;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-bottom: 80px;      /* bagian akhir halaman diberi space agar tidak tertutup tombol */
}                                            /* Container vertikal dengan grid thumbnail */

.vertical-container::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* ========== MANSORY CONTAINER ========== */

.masonry-container {
  column-count: 2;
  column-gap: 10px;
  width: 100%;
  height: auto;
  background: white;
}

/* ========== PART ITEM ========= */
.part-item {
  break-inside: avoid; 
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: block; 
  width: 100%;
  margin-bottom: 20px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: inline-block; 
  transform: translateZ(0);
}

.part-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  pointer-events: auto;
  z-index: 1;
}

.part-item > * {
  position: relative;
  pointer-events: auto;
}

.part-item:active {
  transform: scale(0.98);
  background: #f0f0f0;
}

.part-item:active::after {
  background: rgba(0, 0, 0, 0.05);
}


/* ========== IMAGE CONTAINER ========== */
.image-container,
.part-item img,
.thumbnail-item img {
    touch-action: manipulation;
    pointer-events: auto;
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border-radius: 4px;
    overflow: hidden;
}

.part-item .image-container {
  width: 100%;
  background: #f5f5f5;
}

.part-item .image-container img {
  height: auto;   
  display: block;      
}


/* ===== TEXT WRAPPER ====== */
.text-wrapper {
    bottom: 0px;
    left: 0;
    right: 0;
    z-index: 3;
    text-align: center;
    padding: 8px 4px;
}

.part-item .text-wrapper {
  width: 100%;
  padding: 10px;
  background: white;
}

