/* =============================================================
   LAYOUT — header/navbar, footer, WhatsApp float, toast, modal
   ============================================================= */

/* ---------- Navbar ---------- */
.nav {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(20px, 5vw, 56px);
  padding: clamp(20px, 3vw, 38px) clamp(20px, 4vw, 48px) 0;
  animation: dropIn .8s var(--ease-out) both;
}
.nav--solid { padding-bottom: clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); background: var(--bg); }

/* Logo */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--black); }
.brand:hover { color: var(--black); }
.brand__mark { width: 38px; height: 38px; flex: none; transition: transform .6s var(--ease-out); }
.brand:hover .brand__mark { transform: rotate(-12deg); }
.brand__text { display: grid; line-height: 1; }
.brand__name {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 400;
  color: var(--black);
  letter-spacing: -0.5px;
  text-transform: lowercase;
}
.brand__sub {
  margin-top: 3px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--body);
}
.brand--light .brand__name { color: #fff; }
.brand--light .brand__sub { color: #8e9497; }

/* Links */
.nav__links { display: flex; gap: 34px; margin: 0; padding: 0; list-style: none; }
.nav__links a {
  position: relative;
  font-size: clamp(12px, 2.4vw, 15px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--nav);
  white-space: nowrap;
  text-transform: uppercase;
}
.nav__links a::after {
  content: '';
  position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav__links a:hover { color: #000; }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }

/* Actions kanan */
.nav__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.nav__action {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border: none;
  background: transparent;
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background .25s, color .25s;
}
.nav__action:hover { background: rgba(255,255,255,0.14); color: #fff; }
.nav__action svg { flex: none; }
.nav__cart { padding: 14px 16px; }

.nav--solid .nav__action { color: var(--heading); }
.nav--solid .nav__action:hover { background: rgba(21,188,223,.12); color: var(--ink); }

.cart-badge {
  position: absolute; top: 6px; right: 6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--ink);
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; letter-spacing: 0;
}
.cart-badge.is-bump { animation: bump .45s var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.45); } }

/* Dropdown user */
.nav__auth { position: relative; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 230px;
  filter: drop-shadow(0 18px 30px rgba(17,17,17,.18));
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s, transform .25s var(--ease-out), visibility .25s;
}
.dropdown.is-open { opacity: 1; visibility: visible; transform: none; }
.dropdown__inner {
  --c: 12px;
  padding: 10px;
  background: #fff;
}
.dropdown__head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown__head strong { display: block; color: var(--ink); font-size: 14px; }
.dropdown__head span { font-size: 12px; color: var(--body); word-break: break-all; }
.dropdown a, .dropdown button {
  display: flex; width: 100%; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 0; background: none;
  color: var(--nav);
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--bg); color: #000; }
.dropdown .is-danger { color: var(--danger); }

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 10px 6px;
  border: 0; background: none;
}
.nav__burger span {
  display: block; width: 22px; height: 2px; background: #fff;
  transition: transform .3s var(--ease-out), opacity .2s;
}
.nav--solid .nav__burger span { background: var(--ink); }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  flex-basis: 100%;
  display: flex; flex-direction: column; gap: 18px;
  padding: 22px 20px;
  background: rgba(242,241,240,.96);
  backdrop-filter: blur(8px);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  animation: dropIn .35s var(--ease-out);
}
.nav__mobile[hidden] { display: none; }
.nav__mobile a, .nav__mobile button {
  border: 0; background: none; padding: 0; text-align: left;
  color: #1a1c1e; font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
}
.nav__mobile hr { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--line); }
.nav__mobile .is-danger { color: var(--danger); }

@media (max-width: 700px) {
  .nav__links, .nav__auth, .nav__contact { display: none; }
  .nav__burger { display: flex; }
  .nav__actions { gap: 0; }
  .nav { gap: 12px; }
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  overflow: hidden;
  background: #15181a;
  color: #a3a8ab;
  padding: clamp(60px, 8vw, 100px) var(--gutter-x) 0;
}
.footer__top {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
}
.footer__brand p { max-width: 340px; margin: 22px 0 28px; font-size: 14px; line-height: 1.7; }
.footer h4 {
  margin-bottom: 20px;
  color: #fff;
  font-size: 13px; letter-spacing: .2em;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 14px; }
.footer a { color: #a3a8ab; }
.footer a:hover { color: var(--accent); }
.footer address { font-style: normal; font-size: 14px; line-height: 1.7; }
.footer address span { display: block; margin-bottom: 10px; }
.footer__bottom {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 64px; padding: 24px 0 30px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px; letter-spacing: .06em;
}
.footer__mark {
  position: absolute; left: 50%; bottom: -0.18em;
  transform: translateX(-50%);
  font-size: clamp(80px, 16vw, 240px);
  font-weight: 700; line-height: 1; letter-spacing: -.02em;
  white-space: nowrap; text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.06);
  pointer-events: none;
  user-select: none;
}
@media (max-width: 900px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__top { grid-template-columns: 1fr; } }

/* ---------- WhatsApp floating button ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
}
.wa-float__btn {
  position: relative;
  display: grid; place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 12px 28px -8px rgba(37,211,102,.7);
  transition: transform .3s var(--ease-out);
}
.wa-float__btn::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: ring 2.2s ease-out infinite;
}
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.wa-float__btn:hover { transform: scale(1.08) rotate(-6deg); }
.wa-float__label {
  padding: 10px 14px;
  background: #fff; color: var(--ink);
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  opacity: 0; transform: translateX(10px);
  transition: opacity .25s, transform .25s var(--ease-out);
  pointer-events: none;
}
.wa-float:hover .wa-float__label { opacity: 1; transform: none; }
@media (max-width: 700px) { .wa-float__label { display: none; } }

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed; left: 50%; bottom: 28px; z-index: 100;
  display: grid; gap: 10px;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 32px));
}
.toast {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px;
  background: var(--ink); color: #fff;
  font-size: 14px;
  border-left: 3px solid var(--accent);
  animation: riseIn .45s var(--ease-out);
}
.toast--error { border-color: var(--danger); }
.toast a { color: var(--accent); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 12px; white-space: nowrap; }
.toast.is-leaving { opacity: 0; transform: translateY(10px); transition: .3s; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(17,17,17,.55);
  backdrop-filter: blur(6px);
  animation: fadeIn .25s;
}
.modal[hidden] { display: none; }
.modal__panel {
  --c: 22px;
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  padding: clamp(28px, 4vw, 52px);
  background: var(--bg-alt);
  animation: riseIn .5s var(--ease-out);
}
.modal__close {
  position: absolute; top: 18px; right: 18px;
  width: 42px; height: 42px;
  border: 0; background: var(--ink); color: #fff;
  font-size: 22px; line-height: 1;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.modal__close:hover { background: var(--accent); color: var(--ink); }
body.is-locked { overflow: hidden; }
