/* ==========================================================================
   etalase.css
   Grid produk responsive (4 kolom desktop -> 2 kolom tablet -> 1 kolom hp)
   + tombol navigasi slider (kiri/kanan) yang muncul saat hover kartu produk
   ========================================================================== */

:root {
  --etalase-black: #111;
  --etalase-gray: #777;
  --etalase-light-gray: #f2f2f2;
  --etalase-border: #eaeaea;
}

/* ---------- Pengaman Anti-Overflow ---------- */
.etalase-section,
.etalase-section * {
  box-sizing: border-box;
}

.etalase-section img {
  max-width: 100%;
}

/* ---------- Grid Produk ---------- */
/* Pakai flexbox + justify-content:center supaya baris terakhir yang
   tidak penuh (mis. cuma 3 produk) tetap rapi di tengah, tidak
   menyisakan kolom kosong seperti pada CSS Grid repeat(4, 1fr). */
.etalase-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  position: relative;
}

.etalase-card {
  display: flex;
  flex-direction: column;
  flex: 0 1 calc(25% - 22.5px); /* 4 kartu per baris (gap 30px) */
  min-width: 220px;
}

@media (max-width: 1024px) {
  .etalase-grid {
    gap: 24px;
  }
  .etalase-card {
    flex-basis: calc(50% - 12px); /* 2 kartu per baris */
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .etalase-grid {
    gap: 12px;
  }
  .etalase-card {
    flex-basis: calc(50% - 6px); /* 2 kartu per baris */
    min-width: 0;
  }
}

.product-slider-container {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--etalase-light-gray);
  overflow: hidden;
  border-radius: 4px;
}

.product-link {
  display: block;
  height: 100%;
}

.slides-track {
  height: 100%;
}

.slide-item img {
  display: block;
}

/* ---------- Tombol Panah ---------- */
.slider-btn-prev,
.slider-btn-next {
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #111;
  transition: opacity 0.25s ease, background 0.2s ease;
}

@media (hover: hover) {
  .slider-btn-prev,
  .slider-btn-next {
    opacity: 0;
  }
  .product-slider-container:hover .slider-btn-prev,
  .product-slider-container:hover .slider-btn-next {
    opacity: 1;
  }
}

@media (hover: none) {
  .slider-btn-prev,
  .slider-btn-next {
    opacity: 1;
  }
}

.slider-btn-prev:hover,
.slider-btn-next:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* ---------- Tombol Quick Buy ---------- */
.btn-quick-view {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 11px 0;
  background: #f4dfce;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  z-index: 3;
}

@media (hover: hover) {
  .product-slider-container:hover .btn-quick-view {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: none) {
  .btn-quick-view {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-quick-view:hover {
  background: #efd0b8;
}

/* ---------- Info Produk ---------- */
.product-title {
  color: var(--etalase-black);
}

.product-link:hover .product-title {
  color: #555;
}

.btn-add-cart {
  margin-top: 12px;
  width: 100%;
  padding: 10px 0;
  background: var(--etalase-black);
  color: #fff;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-add-cart:hover {
  background: #333;
}

.btn-add-cart:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ---------- Panel Quick View Inline ---------- */
.inline-qv-container {
  display: none;
  grid-column: 1 / -1;
  position: relative;
  background: #f7f5f2;
  border: 1px solid var(--etalase-border);
  padding: 40px;
  margin: 10px 0;
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}

.qv-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
  z-index: 4;
}

.qv-close:hover {
  color: #111;
}

.qv-content-flex {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.qv-left {
  flex: 1.6 1 420px;
  max-width: 640px;
  min-width: 0;
}

.qv-gallery {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.qv-main-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.qv-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.75);
  color: #111;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
}

.qv-nav-btn:hover {
  background: rgba(255, 255, 255, 0.95);
}

.qv-nav-prev {
  left: 14px;
}

.qv-nav-next {
  right: 14px;
}

.qv-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  overflow: hidden;
}

.qv-thumb {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.6;
  border: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.qv-thumb.active,
.qv-thumb:hover {
  opacity: 1;
  border-color: #111;
}

.qv-right {
  flex: 1 1 300px;
  max-width: 400px;
  min-width: 0;
}

.qv-title {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.qv-price {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ---------- Deskripsi Produk & Rich Text Editor Formatting ---------- */
.qv-desc {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

.qv-desc p {
  margin-bottom: 8px;
  margin-top: 0;
}

.qv-desc p:last-child {
  margin-bottom: 0;
}

.qv-desc ul, 
.qv-desc ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.qv-desc ul {
  list-style-type: disc;
}

.qv-desc ol {
  list-style-type: decimal;
}

.qv-desc li {
  margin-bottom: 4px;
}

.qv-desc strong {
  font-weight: 700;
}

.qv-desc em {
  font-style: italic;
}

.qv-qty-wrapper {
  display: flex;
  align-items: center;
  width: fit-content;
  border: 1px solid #ccc;
  margin-bottom: 20px;
}

.qv-qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.qv-qty-input {
  width: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  height: 32px;
}

.qv-add-btn {
  width: 100%;
  padding: 13px 0;
  background: #3d33e0;
  color: #fff;
  border: none;
  font-weight: 700;
  cursor: pointer;
  border-radius: 2px;
}

.qv-add-btn:hover {
  background: #2c24b8;
}

@media (max-width: 768px) {
  .qv-content-flex {
    flex-direction: column;
  }
  .inline-qv-container {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .etalase-section {
    padding: 30px 16px !important;
  }
}
```[cite: 4]