*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: #faf9fb;
  --sand: #ece6f0;
  --stone: #c7bdd2;
  --lilac: #8d72a8;
  --lilac-light: #c8b6dc;
  --lilac-pale: #f1eaf6;
  --dark: #1c1c1c;
  --mid: #4a4a4a;
  --muted: #8a8a8a;
  --white: #ffffff;

  --font-display: "Cormorant Garant", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --radius-pill: 100px;
  --radius-sm: 6px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--dark);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6%;
  height: 68px;
  background: rgba(250, 249, 251, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand);
}

.logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--dark);
  text-transform: uppercase;
  text-decoration: none;
}
.logo span {
  color: var(--lilac);
}

.nav-menu {
  display: flex;
  gap: 36px;
}
.nav-menu a {
  text-decoration: none;
  color: var(--mid);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: color var(--transition);
  padding-bottom: 2px;
}
.nav-menu a:hover {
  color: var(--dark);
}
.nav-menu a.active {
  color: var(--dark);
  border-bottom: 1.5px solid var(--dark);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  font-size: 18px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}
.icon-btn:hover {
  color: var(--lilac);
}
.icon-btn.active {
  color: var(--dark);
}

.user-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--mid);
  padding: 6px 14px;
  border: 1px solid var(--stone);
  border-radius: var(--radius-pill);
}
.logout-btn {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: var(--dark);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  transition: background var(--transition);
}
.logout-btn:hover {
  background: var(--lilac);
}

/* PAGE HEADER */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 40px 24px 80px;
}

.page-header {
  margin-bottom: 36px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--dark);
  margin-bottom: 6px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--muted);
}

/* LAYOUT */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* CART HEADER */
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: none;
}

.cart-head-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.cart-head-price {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

/* CART ITEM — class names preserved from JS */
.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  padding: 20px 20px;
  border: 1px solid var(--sand);
  border-bottom: none;
  transition: all var(--transition);
}

.cart-item:last-of-type {
  border-bottom: 1px solid var(--sand);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.cart-item:hover {
  background: rgba(250, 249, 251, 0.8);
}

.cart-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.item-check {
  width: 20px;
  height: 20px;
  accent-color: var(--lilac);
  cursor: pointer;
  flex-shrink: 0;
}

.cart-image {
  width: 100px;
  height: 76px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid var(--sand);
}

.cart-info {
  flex: 1;
  min-width: 0;
}

.cart-info h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
  line-height: 1.3;
}

.cart-info p {
  font-size: 12px;
  color: var(--lilac);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 2px;
}

.cart-info span {
  font-size: 13px;
  color: var(--stone);
  display: block;
  margin-bottom: 6px;
}

.cart-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.2px;
}

/* DELETE BUTTON — class name preserved from JS */
.delete-btn {
  background: none;
  border: 1px solid var(--sand);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.delete-btn:hover {
  border-color: #e8a0a0;
  color: #d45858;
  background: #fdf2f2;
}

/* SUMMARY */
.summary-box {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius-sm);
  padding: 28px;
  position: sticky;
  top: 96px;
}

.summary-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sand);
}

.summary-box-header i {
  font-size: 20px;
  color: var(--lilac);
}

.summary-box-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
}

.summary-rows {
  margin-bottom: 24px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.summary-label {
  font-size: 14px;
  color: var(--muted);
}

.summary-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
}

.summary-divider {
  height: 1px;
  background: var(--sand);
  margin: 16px 0;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.total-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
}

.total-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--lilac);
  letter-spacing: -0.3px;
}

.checkout-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition);
}

.checkout-btn:hover {
  background: var(--lilac);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(141, 114, 168, 0.25);
}

.checkout-btn i {
  font-size: 16px;
}

.checkout-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--stone);
}

.checkout-trust i {
  font-size: 14px;
  color: var(--lilac-light);
}

/* EMPTY STATE */
#keranjang-list:empty::before {
  content: "\F23D  Keranjang masih kosong";
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius-sm);
  padding: 64px 40px;
  text-align: center;
  color: var(--stone);
  font-size: 15px;
  font-family: var(--font-body);
}

#keranjang-list:empty::after {
  content: "Jelajahi layanan wellness dan tambahkan ke keranjang";
  display: block;
  margin-top: -30px;
  margin-bottom: 40px;
  text-align: center;
  color: var(--stone);
  font-size: 13px;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--sand);
  padding: 36px 6%;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dark);
}
.footer-logo span {
  color: var(--lilac);
}
footer p {
  font-size: 12px;
  color: var(--muted);
}

/* RESPONSIVE */
@media (max-width: 968px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .summary-box {
    position: static;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 5%;
    flex-wrap: wrap;
    height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 10px;
  }
  .nav-menu {
    order: 3;
    width: 100%;
    gap: 18px;
    padding-bottom: 4px;
  }

  .container {
    padding: 24px 16px 60px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .cart-item {
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
  }

  .cart-left {
    width: 100%;
  }

  .cart-image {
    width: 80px;
    height: 60px;
  }

  .cart-info h3 {
    font-size: 16px;
  }

  .delete-btn {
    margin-left: auto;
  }

  .summary-box {
    padding: 24px 20px;
  }

  .total-value {
    font-size: 22px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
