:root {
  --green: #15c978;
  --green-dark: #078b55;
  --ink: #06110e;
  --muted: #68746f;
  --line: rgba(7, 28, 23, 0.12);
  --soft: #f4faf8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(#010806 0 150px, transparent 150px),
    linear-gradient(180deg, #f8fbfa 0%, #fff 54%, #f5faf8 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar,
.main-nav,
main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar,
.main-nav {
  color: #fff;
  background: #010806;
  box-shadow: 0 0 0 100vmax #010806;
  clip-path: inset(0 -100vmax);
}

.topbar {
  display: grid;
  grid-template-columns: 210px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 22px 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  line-height: 0.92;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--green);
  border-radius: 10px;
  color: var(--green);
  box-shadow: 0 0 24px rgba(21, 201, 120, 0.3);
  font-size: 13px;
}

.search {
  display: flex;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.search input {
  width: 100%;
  min-width: 0;
  padding: 0 18px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.search input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.search button {
  display: grid;
  width: 58px;
  border: 0;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
}

.quick-actions {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.quick-actions a,
.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.quick-actions a.active,
.main-nav a.active {
  color: var(--green);
}

.quick-actions a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 2px;
  background: var(--green);
}

.main-nav {
  display: flex;
  gap: 54px;
  height: 58px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 700;
}

[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-icon] svg {
  width: 20px;
  height: 20px;
}

.breadcrumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 34px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs svg {
  width: 16px;
  height: 16px;
}

.cart-heading {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
}

.cart-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 12px;
  color: var(--green-dark);
  background: #eaf9f2;
}

.cart-heading h1,
.cart-heading p {
  margin: 0;
}

.cart-heading h1 {
  margin-bottom: 10px;
  font-size: 34px;
}

.cart-heading p {
  color: var(--muted);
}

.cart-actions {
  display: flex;
  gap: 12px;
}

.cart-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1c2c27;
  background: #fff;
  font-weight: 800;
}

.cart-actions .delete-all {
  color: #d34552;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.cart-list,
.summary,
.product-card {
  border: 1px solid rgba(7, 28, 23, 0.08);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 42px rgba(14, 42, 35, 0.08);
}

.cart-list {
  padding: 0 24px 24px;
}

.cart-item {
  display: grid;
  grid-template-columns: 34px 138px minmax(0, 1fr) 116px 36px;
  gap: 24px;
  align-items: center;
  min-height: 182px;
  border-bottom: 1px solid var(--line);
}

.cart-item:last-of-type {
  border-bottom: 0;
}

.check input {
  position: absolute;
  opacity: 0;
}

.check span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(7, 139, 85, 0.4);
  border-radius: 5px;
  background: #fff;
}

.check input:checked + span {
  background: var(--green-dark);
}

.check input:checked + span::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.sprite {
  background-image: url("assets/grocery-sprite.png");
  background-repeat: no-repeat;
  background-size: 800% 200%;
}

.item-img {
  width: 118px;
  height: 118px;
  border-radius: 8px;
  background-color: #fff;
  background-position-y: 100%;
}

.rice-pack {
  background-position-x: 0;
}

.oil-pack {
  background-position-x: 14.285%;
}

.sugar-pack {
  background-position-x: 28.57%;
}

.noodle-pack {
  background-position-x: 42.855%;
}

.flour-pack {
  background-position-x: 57.14%;
}

.canned-pack {
  background-position-x: 71.425%;
}

.sauce-pack {
  background-position-x: 85.71%;
}

.item-info h2,
.item-info p {
  margin: 0;
}

.item-info h2 {
  margin-bottom: 6px;
  font-size: 18px;
}

.item-info p,
.item-info small {
  color: var(--muted);
}

.item-info em {
  display: inline-flex;
  margin: 10px 0;
  padding: 4px 9px;
  border-radius: 5px;
  color: var(--green-dark);
  background: #eaf9f2;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.item-info strong {
  display: block;
  margin-top: 20px;
  font-size: 18px;
}

.qty {
  display: grid;
  grid-template-columns: 34px 34px 34px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.qty button {
  border: 0;
  background: #fff;
  cursor: pointer;
}

.qty b {
  display: grid;
  place-items: center;
}

.remove {
  border: 0;
  color: #d34552;
  background: transparent;
  cursor: pointer;
}

.safe-note,
.voucher {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  color: #14332b;
  background: #f0faf6;
}

.safe-note p,
.voucher p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.safe-note svg,
.voucher svg {
  width: 28px;
  height: 28px;
  color: var(--green-dark);
}

.summary {
  position: sticky;
  top: 20px;
  padding: 26px 24px;
}

.summary h2 {
  margin: 0 0 28px;
  font-size: 20px;
}

.summary-row,
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.summary-row span {
  color: #3e4c47;
}

.free,
.summary-total strong {
  color: var(--green-dark);
}

.summary-total {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 18px;
  font-weight: 900;
}

.voucher {
  margin: 26px 0;
}

.checkout,
.continue-btn {
  display: flex;
  width: 100%;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 900;
}

.checkout {
  gap: 10px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 16px 32px rgba(7, 139, 85, 0.23);
}

.continue-text {
  margin: 16px 0 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.continue-btn {
  border: 1px solid var(--green-dark);
  color: var(--green-dark);
  background: #fff;
}

.benefit-list {
  display: grid;
  gap: 22px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.benefit-list article {
  display: flex;
  gap: 14px;
}

.benefit-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.recommend {
  margin: 28px 0 40px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 21px;
}

.section-head a {
  color: var(--green-dark);
  font-weight: 800;
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.product-card {
  position: relative;
  padding: 14px;
}

.product-art {
  height: 112px;
  border-radius: 7px;
  background-color: #fff;
  background-position-y: 100%;
}

.product-card h3,
.product-card p {
  margin: 0;
}

.product-card h3 {
  margin-top: 12px;
  font-size: 14px;
}

.product-card p {
  margin-top: 4px;
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
}

.product-card strong {
  display: block;
  margin: 8px 0;
}

.product-card span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: #69746f;
  font-size: 12px;
}

.product-card span svg {
  width: 14px;
  height: 14px;
  color: #ffbf24;
  fill: #ffbf24;
}

.product-card button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(21, 201, 120, 0.22);
  border-radius: 7px;
  color: var(--green-dark);
  background: #f2fff8;
  font-size: 21px;
  font-weight: 900;
}

.footer {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 42px;
  width: 100%;
  padding: 46px max(20px, calc((100vw - 1180px) / 2)) 30px;
  color: #fff;
  background: #010806;
}

.footer h3 {
  margin: 0 0 18px;
  font-size: 16px;
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.55;
}

.footer a {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
}

.footer button {
  display: block;
  width: 142px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  color: #fff;
  background: transparent;
  text-align: left;
  line-height: 1.1;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 16px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
  margin: 0;
  font-size: 13px;
}

.payment-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  align-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.pay-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
}

.visa {
  font-style: italic;
}

.mastercard {
  min-width: 38px;
}

.mastercard i {
  width: 17px;
  height: 17px;
  border-radius: 50%;
}

.mastercard i:first-child {
  background: #ff5f35;
  margin-right: -6px;
}

.mastercard i:last-child {
  background: #ffc340;
  mix-blend-mode: screen;
}

.bca {
  gap: 5px;
}

.bca i {
  width: 16px;
  height: 12px;
  border-radius: 3px;
  background: #1d7cd8;
}

.mandiri {
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.mandiri i {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: #ffd44a;
}

.dana {
  padding: 4px 8px;
  border-radius: 6px;
  background: #1288e8;
  font-size: 12px;
}

.linkaja {
  gap: 4px;
}

.linkaja i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e7262e;
}

@media (max-width: 1020px) {
  body {
    background:
      linear-gradient(#010806 0 238px, transparent 238px),
      linear-gradient(180deg, #f8fbfa 0%, #fff 54%, #f5faf8 100%);
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    font-size: 12px;
  }

  .quick-actions a {
    justify-content: center;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    font-size: 12px;
  }

  .main-nav a {
    justify-content: center;
    text-align: center;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .summary {
    position: static;
  }

  .recommend-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .payment-icons {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .topbar,
  .main-nav,
  main {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .search {
    height: 44px;
  }

  .search input {
    padding: 0 14px;
    font-size: 14px;
  }

  .quick-actions,
  .main-nav {
    font-size: 11px;
  }

  .cart-heading {
    grid-template-columns: 48px 1fr;
  }

  .cart-actions {
    grid-column: 1 / -1;
  }

  .cart-actions button {
    flex: 1;
    justify-content: center;
    padding: 0 10px;
    font-size: 12px;
  }

  .cart-list {
    padding: 0 14px 18px;
  }

  .cart-item {
    grid-template-columns: 28px 94px 1fr;
    gap: 12px;
    min-height: auto;
    padding: 18px 0;
  }

  .item-img {
    width: 88px;
    height: 88px;
  }

  .qty {
    grid-column: 2 / 3;
    width: 102px;
  }

  .remove {
    grid-column: 3;
    justify-self: end;
  }

  .recommend-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .footer {
    padding-right: 12px;
    padding-left: 12px;
  }
}
