/* ===========================================
   LAPAK SKENU — front.css v2.1
   =========================================== */

/* ── RESET & BASE ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #111111;
  --white:   #ffffff;
  --gray50:  #f9fafb;
  --gray100: #f3f4f6;
  --gray300: #d1d5db;
  --gray500: #6b7280;
  --gray700: #374151;
  --accent:  #fe90c6;
  --font:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

img { display: block; max-width: 100%; }
a   { color: inherit; }

/* ── ANNOUNCEMENT BAR ─────────────────────── */
.announcement-bar {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 8px 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.announcement-bar a { color: var(--accent); text-decoration: underline; }

/* ── HEADER ───────────────────────────────── */
.main-header {
  position: sticky;
  top: 0;
  z-index: 9000;
  background: var(--white);
  border-bottom: 2px solid var(--black);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-link img { width: 100px; height: auto; }

/* ── NAV DESKTOP ──────────────────────────── */
.front-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}

.front-nav-item { position: relative; }

.front-nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-decoration: none;
  color: var(--black);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  border-bottom: 2px solid transparent;
}
.front-nav-link:hover,
.front-nav-item:hover > .front-nav-link {
  background: var(--gray50);
  border-bottom-color: var(--black);
}

/* Dropdown biasa */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  background: var(--white);
  border: 1.5px solid var(--black);
  border-top: none;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 9100;
}
.front-nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu li a {
  display: block;
  padding: 10px 16px;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--black);
  border-bottom: 1px solid var(--gray100);
}
.dropdown-menu li:last-child a { border-bottom: none; }
.dropdown-menu li a:hover { background: var(--gray50); }

/* Mega menu */
.has-mega-menu { position: static; }

.mega-menu {
  position: fixed;
  top: auto; /* akan di-set via JS atau dioverride per .main-header offset */
  left: 0;
  width: 100%;
  background: var(--white);
  border-top: 1px solid var(--gray300);
  border-bottom: 2px solid var(--black);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 8999;
}
/* posisi mega menu tepat di bawah header */
.main-header:has(.has-mega-menu:hover) + * { /* sibling shift — tidak dipakai */ }
.has-mega-menu:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* bridge kursor */
.has-mega-menu::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 8px;
}

.mega-menu-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px;
}

.mega-menu-column h4 {
  font-size: 0.63rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gray500);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray300);
}
.mega-menu-column ul { list-style: none; }
.mega-menu-column ul li { margin-bottom: 9px; }
.mega-menu-column ul li a {
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--black);
  font-weight: 500;
}
.mega-menu-column ul li a:hover { text-decoration: underline; }

.mega-product-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--black);
  margin-bottom: 10px;
  padding: 6px 8px;
  border: 1px solid transparent;
  transition: border-color .15s;
}
.mega-product-item:hover { border-color: var(--black); }
.mega-product-item img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid var(--gray300);
  flex-shrink: 0;
}
.mega-product-info h5 { font-size: 0.78rem; font-weight: 600; margin-bottom: 3px; line-height: 1.3; }
.mega-product-info span { font-size: 0.75rem; font-weight: 800; }

/* ── HEADER ACTIONS ───────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  text-decoration: none;
  color: var(--black);
  border: 1px solid transparent;
  transition: border-color .15s, background .15s;
  position: relative;
  flex-shrink: 0;
}
.action-icon:hover { border-color: var(--black); background: var(--gray50); }
.action-icon .lucide { width: 18px; height: 18px; stroke-width: 1.8; }

/* Cart badge */
.cart-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--black);
  color: var(--white);
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1;
  min-width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ── MINI CART ────────────────────────────── */
/* Wrapper keranjang — harus punya posisi dan jadi trigger hover */
.cart-icon-wrapper {
  position: relative;
  /* Bridge agar hover tidak putus saat kursor gerak ke dropdown */
  padding-bottom: 12px;
  margin-bottom: -12px;
}

.mini-cart-dropdown {
  position: absolute;
  top: calc(100% - 12px); /* kompensasi padding-bottom bridge */
  right: 0;
  width: 300px;
  background: var(--white);
  border: 2px solid var(--black);
  box-shadow: 4px 4px 0 rgba(0,0,0,.12);
  padding: 16px;
  /* Sembunyi default — hanya muncul saat hover wrapper */
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 9200;
  cursor: default;
}
/* Tampil saat hover pada wrapper */
.cart-icon-wrapper:hover .mini-cart-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mini-cart-title {
  font-size: 0.63rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px dashed var(--black);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.mini-cart-scrollbox { max-height: 200px; overflow-y: auto; margin-bottom: 12px; }
.mini-cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray100);
  gap: 8px;
}
.mini-cart-row:last-child { border-bottom: none; }
.mini-item-details { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.mini-item-name {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-item-meta { font-size: 0.67rem; color: var(--gray500); }
.mini-item-price { font-size: 0.76rem; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.mini-cart-remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mini-cart-remove-btn:hover { background: #fef2f2; }
.mini-cart-empty { padding: 20px 0; text-align: center; font-size: 0.8rem; color: var(--gray500); }
.mini-cart-footer {
  border-top: 1px solid var(--black);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mini-total-box {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}
.mini-btn-checkout {
  display: block;
  text-align: center;
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 10px;
  border: 1px solid var(--black);
  box-shadow: 3px 3px 0 var(--accent);
  transition: box-shadow .15s;
}
.mini-btn-checkout:hover { box-shadow: 1px 1px 0 var(--accent); }

/* ── MOBILE NAV ───────────────────────────── */
.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--black);
  cursor: pointer;
  color: var(--black);
  padding: 6px 8px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.menu-toggle .lucide { width: 20px; height: 20px; stroke-width: 2; }

.close-menu-btn {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: 1.5px solid var(--black);
  cursor: pointer;
  color: var(--black);
  padding: 5px;
  align-items: center;
  justify-content: center;
}
.close-menu-btn .lucide { width: 16px; height: 16px; }

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 8998;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

.mobile-icon  { display: none; }
.desktop-only { display: block; }

/* ── MAIN CONTENT ─────────────────────────── */
.main-content { flex: 1; }

/* ── HERO SLIDER ──────────────────────────── */
/* Slider keluar dari .container — full width */
.hero-full-width {
  width: 100%;
  margin-bottom: 50px;
}

.front-hero-slider {
  position: relative;
  width: 100%;
  height: 460px;
  overflow: hidden;       /* gambar tidak boleh keluar */
  background: var(--gray100);
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
}

.front-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s ease;
}
.front-slide.active { opacity: 1; z-index: 1; }

/* Gambar slider — cover penuh, tidak bocor */
.front-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.front-slide-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 32px 40px;
}

.front-btn {
  background: var(--black);
  color: var(--white);
  padding: 11px 24px;
  border: 1px solid var(--black);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-decoration: none;
  display: inline-block;
  box-shadow: 3px 3px 0 var(--accent);
  transition: box-shadow .15s;
}
.front-btn:hover { box-shadow: 1px 1px 0 var(--accent); }

.front-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.9);
  color: var(--black);
  border: 1px solid var(--black);
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 10;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.front-slider-btn:hover { background: var(--black); color: var(--white); }
.front-slider-btn.prev { left: 16px; }
.front-slider-btn.next { right: 16px; }

/* ── PRODUCT GRID ─────────────────────────── */
.front-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px 18px;
  margin-top: 20px;
}
.front-product-card {
  text-decoration: none;
  color: var(--black);
  display: flex;
  flex-direction: column;
}
.front-product-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border: 1px solid var(--gray300);
  transition: opacity .2s;
}
.front-product-card:hover .front-product-img { opacity: .85; }
.front-product-info { padding: 10px 0 0; flex: 1; display: flex; flex-direction: column; }
.front-price-strike { text-decoration: line-through; color: var(--gray500); font-size: 0.78rem; margin-right: 4px; }

/* ── PRODUCT DETAIL ───────────────────────── */
.detail-wrapper {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  margin: 30px 0 80px;
  /* Penting: align-items stretch agar kedua kolom bisa scroll independen */
  align-items: start;
}

/* Kolom kiri: galeri scroll bebas ke bawah — tidak ada height limit */
.detail-col-gallery {
  /* tidak ada overflow hidden, tidak ada sticky — scroll ikut halaman */
}

/* Kolom kanan: sticky, mengunci di posisi saat kiri di-scroll */
.detail-info-panel {
  position: sticky;
  top: 78px;
  height: fit-content;
  /* Tidak ada max-height/overflow — konten tampil penuh, sticky tetap bekerja */
}
.detail-meta-cat { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gray500); margin-bottom: 8px; display: block; }
.detail-title { font-size: 1.6rem; font-weight: 800; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
.detail-price-box { font-size: 1.25rem; font-weight: 800; border-bottom: 2px solid var(--black); padding-bottom: 14px; margin-bottom: 22px; }
.frugal-po-badge { display: block; border: 1px dashed var(--black); padding: 12px; font-size: 0.83rem; line-height: 1.5; margin-bottom: 22px; background: var(--gray50); }
.frugal-spec-list { list-style: none; margin-bottom: 22px; padding: 10px 0; border-top: 1px dashed var(--gray300); border-bottom: 1px dashed var(--gray300); }
.frugal-spec-list li { font-size: 0.83rem; line-height: 1.7; color: #444; }
.frugal-spec-list li strong { color: var(--black); text-transform: uppercase; font-size: 0.75rem; margin-right: 4px; }
.detail-size-section { margin-bottom: 24px; }
.detail-size-section h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.size-radio { display: none; }
.size-label { display: flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; border: 1px solid var(--black); font-size: 0.82rem; font-weight: 700; cursor: pointer; padding: 0 10px; transition: background .15s, color .15s; }
.size-label:hover { background: var(--gray100); }
.size-radio:checked + .size-label { background: var(--black); color: var(--white); }
.size-radio:disabled + .size-label { opacity: .35; text-decoration: line-through; background: var(--gray50); border-color: var(--gray300); cursor: not-allowed; }
.front-btn:disabled { background: var(--gray300); border-color: var(--gray300); color: var(--gray500); cursor: not-allowed; box-shadow: none; }
.detail-desc-section { margin-top: 28px; border-top: 1px solid var(--gray300); padding-top: 18px; }
.detail-desc-section h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.detail-desc-content { font-size: 0.88rem; line-height: 1.75; color: #444; }
.detail-desc-content p { margin-bottom: 14px; }

/* ── FOOTER ───────────────────────────────── */
.main-footer {
  background: var(--white);
  border-top: 2px solid var(--black);
  margin-top: 80px;
  padding: 48px 0 0;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--gray300);
}
.footer-col { text-align: left; }
.footer-col-logo img { width: 88px; margin-bottom: 14px; filter: grayscale(1); opacity: .8; }
.footer-col p { font-size: 0.82rem; line-height: 1.7; color: var(--gray700); }
.footer-col h4 { font-size: 0.63rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1.2px; color: var(--black); margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--black); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.82rem; text-decoration: none; color: var(--gray700); }
.footer-col ul li a:hover { color: var(--black); text-decoration: underline; }
.social-icons { display: flex; gap: 8px; margin-top: 16px; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--black); color: var(--black); text-decoration: none; transition: background .15s, color .15s; }
.social-icons a:hover { background: var(--black); color: var(--white); }
.social-icons a .lucide { width: 15px; height: 15px; stroke-width: 2; }
.footer-media-img { max-width: 100%; height: auto; border: 1px solid var(--gray300); padding: 6px; margin-bottom: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; font-size: 0.75rem; color: var(--gray500); }
.footer-bottom a { color: var(--black); text-decoration: underline; }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 768px) {

  /* Header */
  .menu-toggle { display: flex; }
  .logo-link img { width: 80px; }
  .desktop-only { display: none !important; }
  .mobile-icon { display: inline-block; margin-right: 8px; color: var(--gray500); width: 16px; height: 16px; }
  .close-menu-btn { display: flex; }

  /* Sidebar nav */
  .front-nav {
    position: fixed;
    top: 0; left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 64px 0 24px;
    border-right: 2px solid var(--black);
    z-index: 9500;
    transition: left .25s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,.1);
  }
  .front-nav.mobile-active { left: 0; }
  .front-nav-item { width: 100%; border-bottom: 1px solid var(--gray100); }
  .front-nav-link { padding: 14px 20px; font-size: 0.85rem; width: 100%; border-bottom: none; }
  .front-nav-link:hover { background: var(--gray50); border-bottom: none; }

  /* Mega & dropdown jadi static di mobile */
  .mega-menu, .dropdown-menu {
    position: static !important;
    border: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    padding: 0 0 12px 20px;
    background: transparent;
    box-shadow: none;
  }
  .mega-menu-container { grid-template-columns: 1fr; gap: 10px; padding: 0; }
  .mega-menu-column h4 { font-size: 0.65rem; }

  /* Mini cart */
  .cart-icon-wrapper { padding-bottom: 0; margin-bottom: 0; }
  .mini-cart-dropdown {
    width: min(300px, calc(100vw - 30px));
    right: 0;
    top: 100%;
  }

  /* Hero */
  .front-hero-slider { height: 260px; }
  .front-slide-content { padding: 20px; }

  /* Product grid */
  .front-product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }

  /* Detail */
  .detail-wrapper { grid-template-columns: 1fr; gap: 0; margin-bottom: 50px; }
  .detail-col-gallery { margin-bottom: 28px; }
  /* Mobile: panel kanan tidak sticky, scroll normal */
  .detail-info-panel {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding: 0;
  }
  .detail-title { font-size: 1.3rem; }

  /* Footer */
  .main-footer { margin-top: 50px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-col:nth-child(1) { grid-column: 1 / -1; }
  .footer-col:nth-child(4) { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .front-product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px 8px; }
}
