/* ============================================================
   SHOP / KATALOG B2B STYLING (Final Sticky Left & Right)
   ============================================================ */
body { background-color: #f4f6fa; }

.shop-nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.shop-nav-right { display: flex; align-items: center; gap: 1rem; }

.shop-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-stone-100);
  display: grid;
  place-items: center;
  color: var(--color-navy-900);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.shop-icon-btn:hover { background: var(--color-stone-200); }
.badge-dot {
  position: absolute; top: 4px; right: 4px;
  background: var(--color-red-600); color: white;
  font-size: 0.65rem; font-weight: 700; width: 16px; height: 16px;
  border-radius: 50%; display: grid; place-items: center;
}
.shop-login-btn { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; background: #5022c3; border-radius: 999px; color: white; padding: 0.5rem 1.2rem; }
.shop-login-btn:hover { background: #3e189c; }

/* Layout Grid 3 Kolom dengan Sticky Kiri & Kanan */
.shop-main {
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  gap: 1.5rem;
  margin-top: calc(70px + 1.5rem);
  padding-inline: clamp(1rem, 3vw, 2.25rem);   /* ← baris baru, gantiin class container */
  padding-bottom: 3rem;
  align-items: start;
}

/* Sidebar Kiri Sticky */
.shop-sidebar {
  position: sticky;
  top: calc(70px + 1.5rem);
  height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: none;
}
.shop-sidebar::-webkit-scrollbar { display: none; }

/* Sidebar Kanan (Keranjang) Sticky */
.shop-cart-sidebar {
  position: sticky;
  top: calc(70px + 1.5rem);
  height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: none;
}
.shop-cart-sidebar::-webkit-scrollbar { display: none; }

.shop-box {
  background: var(--color-white);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(18,23,58,0.04);
  margin-bottom: 1.25rem;
  border: 1px solid var(--color-stone-200);
}
.shop-box h3 { font-size: 1rem; color: var(--color-navy-900); margin-bottom: 0.85rem; font-family: var(--font-display); }

/* Sidebar Kategori & Filter */
.shop-cat-list { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.shop-cat-list li {
  padding: 0.6rem 0.85rem; border-radius: 8px; font-size: 0.88rem; font-weight: 600;
  color: var(--color-stone-600); cursor: pointer; transition: all var(--dur-fast);
}
.shop-cat-list li:hover { background: var(--color-stone-50); color: var(--color-navy-900); }
.shop-cat-list li.active { background: #5022c3; color: white; }

.filter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.85rem; }
.reset-link { font-size: 0.75rem; color: var(--color-red-600); cursor: pointer; font-weight: 600; }
.filter-group { margin-top: 1rem; border-top: 1px solid var(--color-stone-100); padding-top: 0.85rem; }
.filter-group h4 { font-size: 0.82rem; color: var(--color-navy-900); margin-bottom: 0.5rem; }
.filter-group label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--color-stone-600); margin-bottom: 0.4rem; cursor: pointer; }

/* Banner Toko Ungu */
.shop-banner {
  background: linear-gradient(135deg, #231942, #5022c3);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.shop-banner h1 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); font-family: var(--font-display); line-height: 1.2; margin-bottom: 0.5rem; }
.shop-banner p { font-size: 0.9rem; color: rgba(255,255,255,0.8); line-height: 1.5; }
.floating-cart-icon { font-size: 4rem; opacity: 0.8; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Toolbar Pencarian & Urutan */
.shop-toolbar { display: flex; gap: 1rem; margin-bottom: 1rem; }
.shop-search-bar {
  flex: 1; background: white; border: 1px solid var(--color-stone-200); border-radius: 999px;
  padding: 0.6rem 1.2rem; display: flex; align-items: center; gap: 0.6rem; color: var(--color-stone-400);
}
.shop-search-bar input { border: none; outline: none; width: 100%; font-size: 0.9rem; color: var(--color-navy-900); }
.shop-sort-wrap {
  background: white; border: 1px solid var(--color-stone-200); border-radius: 999px;
  padding: 0 1rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--color-stone-600);
}
.shop-sort-wrap select { border: none; outline: none; background: transparent; font-weight: 600; color: var(--color-navy-900); cursor: pointer; }

/* Brand Pills */
.shop-brand-pills { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
.shop-brand-pills::-webkit-scrollbar { display: none; }
.brand-pill {
  background: white; border: 1px solid var(--color-stone-200); padding: 0.5rem 1.1rem;
  border-radius: 999px; font-size: 0.82rem; font-weight: 600; color: var(--color-stone-600); cursor: pointer; white-space: nowrap; transition: all var(--dur-fast);
}
.brand-pill:hover { border-color: var(--color-navy-700); }
.brand-pill.active { background: #5022c3; color: white; border-color: #5022c3; }

/* Grid Produk (4 di Desktop, 2 di Android) */
.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.85rem;
  align-items: start;   /* ← WAJIB: matiin "peregangan" otomatis grid yang jadi biang bug ini */
}

.shop-card {
  background: white;
  border: 1px solid var(--color-stone-200);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
  /* overflow:hidden DICABUT dari sini, dipindah ke .shop-card__img aja */
}

.shop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(18,23,58,0.08);
}

.shop-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--color-stone-50);
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.shop-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0.5rem;
}


.shop-card__brand {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  font-size: 0.6rem;
  font-family: var(--font-mono);
  background: var(--color-stone-100);
  color: var(--color-navy-700);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.shop-wishlist-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  color: var(--color-stone-400);
  cursor: pointer;
  font-size: 0.95rem;
  background: none;
  border: none;
}


.shop-card__body {
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  border-top: 1px solid var(--color-stone-100);
}

.shop-card__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-navy-900);
  line-height: 1.25;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-card__unit {
  font-size: 0.65rem;
  color: var(--color-stone-400);
  margin-bottom: 0.6rem;
}

.shop-card__footer {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: auto;
}

.shop-card__price {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-navy-900);
}

.shop-add-btn {
  background: #5022c3;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35em 0.6em;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background var(--dur-fast);
  width: 100%;
}

.shop-add-btn:hover { background: #3e189c; }

/* Keranjang Belanja Sidebar */
.cart-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--color-stone-200); padding-bottom: 0.75rem; margin-bottom: 0.85rem; }
.cart-count-badge { background: #5022c3; color: white; font-size: 0.75rem; font-weight: 700; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.cart-items-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; padding-right: 0.25rem; }
.cart-empty-text { font-size: 0.82rem; color: var(--color-stone-400); text-align: center; padding: 1.5rem 0; }

.cart-item { display: flex; gap: 0.65rem; align-items: center; border-bottom: 1px solid var(--color-stone-100); padding-bottom: 0.65rem; }
.cart-item__img { width: 44px; height: 44px; object-fit: contain; background: var(--color-stone-50); border-radius: 6px; padding: 2px; }
.cart-item__info { flex: 1; }
.cart-item__info h5 { font-size: 0.78rem; font-weight: 700; color: var(--color-navy-900); line-height: 1.2; margin-bottom: 0.1rem; }
.cart-item__brand { font-size: 0.65rem; color: var(--color-stone-400); }
.cart-item__controls { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; font-size: 0.78rem; }
.qty-btn { width: 20px; height: 20px; background: var(--color-stone-100); border-radius: 4px; display: grid; place-items: center; font-weight: bold; cursor: pointer; }
.qty-btn:hover { background: var(--color-stone-200); }
.cart-item__price { margin-left: auto; font-weight: 700; color: var(--color-navy-700); font-size: 0.78rem; }
.cart-item__del { color: var(--color-stone-400); cursor: pointer; font-size: 0.85rem; padding: 4px; }
.cart-item__del:hover { color: var(--color-red-600); }

.cart-summary { margin-top: 1rem; border-top: 1px solid var(--color-stone-200); padding-top: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.85rem; }
.summary-row { display: flex; justify-content: space-between; color: var(--color-stone-600); }
.total-row { font-weight: 800; color: var(--color-navy-900); font-size: 1rem; margin-top: 0.25rem; border-top: 1px dashed var(--color-stone-200); padding-top: 0.4rem; }

.checkout-btn { width: 100%; justify-content: center; margin-top: 1rem; background: #5022c3; border-radius: 8px; color: white; padding: 0.6rem; font-weight: 700; }
.checkout-btn:hover { background: #3e189c; }
.view-cart-btn { width: 100%; justify-content: center; margin-top: 0.5rem; font-size: 0.78rem; border-radius: 8px; padding: 0.5rem; border: 1px solid var(--color-stone-200); background: white; cursor: pointer; }

/* Perks di Bawah Keranjang */
.shop-perks-box { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; }
.perk-item { display: flex; align-items: center; gap: 0.75rem; background: var(--color-stone-50); padding: 0.65rem 0.85rem; border-radius: 10px; }
.perk-item span { font-size: 1.2rem; }
.perk-item h4 { font-size: 0.78rem; font-weight: 700; color: var(--color-navy-900); }
.perk-item p { font-size: 0.68rem; color: var(--color-stone-400); }

/* Responsif Mobile & Android */
@media (max-width: 1024px) {
  .shop-main { grid-template-columns: 220px 1fr; }
  .shop-cart-sidebar { grid-column: 1 / -1; position: static; height: auto; }
}

@media (max-width: 768px) {
  .shop-main { grid-template-columns: 1fr; }
  .shop-sidebar { display: none; }
  .shop-product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem;
  }
  .shop-card__title { font-size: 0.72rem; }
  .shop-card__price { font-size: 0.75rem; }
  .shop-add-btn { font-size: 0.65rem; padding: 0.3em 0.4em; }
}