:root {
  --primary: #b6895b;
  --bg: #010101;
  --card: #171717;
  --muted: #bcbcbc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: radial-gradient(circle at top, #1b1b1b 0%, var(--bg) 55%);
  color: #fff;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 7%;
  background-color: rgba(1, 1, 1, 0.82);
  border-bottom: 1px solid rgba(182, 137, 91, 0.35);
}

.topbar h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

.back-link {
  color: #fff;
  text-decoration: none;
  background: rgba(182, 137, 91, 0.18);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: background-color 200ms ease;
}

.back-link:hover {
  background: rgba(182, 137, 91, 0.3);
}

.container {
  width: min(1100px, 92%);
  margin: 2rem auto 3rem;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1.2fr 1fr;
}

.product-card,
.cart-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.25rem;
  backdrop-filter: blur(4px);
}

.product-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.25rem;
}

.product-image-wrap {
  border-radius: 1rem;
  overflow: hidden;
  background: #111;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.pill {
  display: inline-block;
  font-size: 0.75rem;
  background: rgba(182, 137, 91, 0.25);
  color: #f4dcc4;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.7rem;
}

.product-info h2 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

.product-desc {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.price {
  color: #ffd6ae;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.qty-box .label {
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.step-btn {
  width: 2.2rem;
  height: 2.2rem;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
}

.step-btn:hover {
  background: rgba(182, 137, 91, 0.24);
}

#qtyInput {
  width: 3rem;
  text-align: center;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 1rem;
}

.summary-line {
  margin: 1rem 0;
  padding: 0.8rem 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.16);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
  display: flex;
  justify-content: space-between;
}

.primary-btn {
  width: 100%;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #cb9762, var(--primary));
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn:hover {
  filter: brightness(1.06);
}

.status-text {
  min-height: 1.25rem;
  margin-top: 0.6rem;
  color: #8fe0aa;
  font-size: 0.92rem;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.cart-head h3 {
  font-size: 1.2rem;
}

.text-btn {
  border: none;
  background: transparent;
  color: #f1c99f;
  cursor: pointer;
}

.cart-list {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.7rem;
  padding: 0.7rem;
}

.cart-item-name {
  font-weight: 600;
}

.cart-item-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mini-btn {
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 0.35rem;
  cursor: pointer;
  background: rgba(182, 137, 91, 0.2);
  color: #fff;
}

.mini-btn:hover {
  background: rgba(182, 137, 91, 0.4);
}

.remove-btn {
  background: rgba(255, 92, 92, 0.16);
}

.remove-btn:hover {
  background: rgba(255, 92, 92, 0.3);
}

.cart-total-row {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-empty {
  color: var(--muted);
  padding: 0.4rem 0;
}

.wa-btn {
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.78rem 1rem;
  border: none;
  border-radius: 0.7rem;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #2cbf64, #1fa855);
  transition: filter 180ms ease, transform 180ms ease;
}

.wa-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.wa-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .product-image-wrap img {
    min-height: 220px;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 0.9rem 1rem;
  }

  .topbar h1 {
    font-size: 1rem;
  }

  .container {
    width: 94%;
    margin-top: 1rem;
  }
}
