:root {
  --bg1: #ffdff6;
  --bg2: #dff7ff;
  --accent-a: #ff9bb3;
  --accent-b: #ffd78f;
  --text: #222;
  --muted: #7b7b7b;
  --card: rgba(255, 255, 255, 0.92);
  --glass: rgba(255, 255, 255, 0.66);
  --shadow-soft: 0 8px 30px rgba(16, 24, 40, 0.04);
}

/* RESET GLOBAL */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* CONTAINER */
.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

/* ANIMASI */
.fade-in {
  animation: fadein 0.6s ease both;
}
@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* NAVBAR */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, var(--glass), transparent);
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
}
.nav-left {
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.logo-text {
  font-weight: 600;
  font-size: 16px;
}
.logo-text strong {
  color: var(--accent-a);
}
.nav-center {
  flex: 1;
  justify-content: center;
}
.nav-links {
  display: flex;
  gap: 8px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  transition: all 0.18s ease;
}

/* ICONS */
.icon-btn {
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
}
.cart-btn {
  position: relative;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.cart-count {
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 7px;
  border-radius: 999px;
  font-weight: 700;
}

/* BANNER */
.banner-area {
  margin-top: 12px;
}
.banner-inner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}
.banner-visual {
  position: relative;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
}
.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.92);
}
.banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #222;
  padding: 16px;
}
.banner-overlay h1 {
  margin: 0;
  font-size: 36px;
  text-shadow: 0 6px 30px rgba(255, 255, 255, 0.6);
}
.banner-overlay .lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

/* CARD */
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 18px;
  margin-top: 18px;
  box-shadow: var(--shadow-soft);
}

/* SECTIONS */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.section-header h2 {
  margin: 0;
  font-size: 20px;
}
.small {
  font-size: 13px;
  color: var(--muted);
}

/* GRID PRODUK */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.produk-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96),
    rgba(255, 255, 255, 0.94)
  );
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.produk-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.08);
}
.produk-media {
  width: 100%;
  padding-top: 75%;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
}
.produk-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.produk-body {
  width: 100%;
  text-align: center;
  padding: 6px 4px;
}
.produk-title {
  font-size: 15px;
  margin: 0;
  min-height: 40px;
  color: var(--text);
}
.produk-price {
  font-weight: 700;
  margin-top: 6px;
  color: var(--text);
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 120;
}
.modal[aria-hidden="false"] {
  display: block;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.45);
}
.modal-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 920px;
  max-width: 95%;
  background: var(--card);
  border-radius: 12px;
  z-index: 130;
  box-shadow: 0 30px 80px rgba(16, 24, 40, 0.18);
  overflow: hidden;
}
.modal-content {
  display: flex;
  gap: 12px;
}
.modal-media {
  flex: 1;
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-media img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
}
.modal-body {
  flex: 1;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-price {
  font-weight: 700;
}

/* CART SIDEBAR */
.cart-sidebar {
  position: fixed;
  top: 0;
  width: 380px;
  height: 100%;
  background: var(--card);
  box-shadow: -20px 0 60px rgba(16, 24, 40, 0.12);
  z-index: 140;
  transition: right 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
}
.cart-sidebar.open {
  right: 0;
  visibility: visible;
  opacity: 1;
}
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.cart-items {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
}
.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}
.cart-item .meta {
  flex: 1;
}
.cart-item .meta .title {
  font-weight: 600;
}
.cart-item .meta .sub {
  font-size: 13px;
  color: var(--muted);
}
.cart-footer {
  padding: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.checkout-btn {
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  color: white;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  text-decoration: none;
  display: block;
}

/* CHECKOUT FORM */
.checkout-form .form-group {
  margin-bottom: 16px;
}
.checkout-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
}
.checkout-form input,
.checkout-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  transition: border 0.2s;
}
.checkout-form input:focus,
.checkout-form textarea:focus {
  border-color: var(--accent-a);
  outline: none;
}
.checkout-form button {
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  color: #fff;
  border: none;
  padding: 12px 0;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.checkout-form button:hover {
  background: #e05595;
}

/* PESANAN BERHASIL */
.pesanan-success h2 {
  color: #4caf50;
  margin-bottom: 12px;
}
.pesanan-success p {
  margin-bottom: 8px;
}
.pesanan-success .button {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 24px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  color: #fff;
  text-decoration: none;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 9999;
}

/* FOOTER */
.footer {
  padding: 28px 0;
  background: transparent;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
}
.footer-inner p {
  margin: 6px 0;
}

/* RESPONSIVE */
@media (max-width: 800px) {
  .nav-center {
    display: none;
  }
  .modal-panel {
    width: 94%;
  }
  .banner-img {
    height: 250px;
    object-fit: cover;
  }
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
  .cart-sidebar.open {
    right: 0;
  }
  .produk-media {
    padding-top: 100%;
  }
}
