/* ========================================
   gaya.css — Tunas Muda Shopee Style
   ======================================== */
:root {
  --or: #00AA5B;
  /* hijau utama */
  --or2: #66bb6a;
  /* hijau muda */
  --or3: #2e7d32;
  /* hijau tua */
  --gr: #81c784;
  /* hijau tambahan */
  --rd: #2e7d32;
  /* ganti merah jadi hijau tua */

  --tx: #212121;
  --mt: #757575;
  --bg: #F5F5F5;
  --wh: #fff;
  --bd: #E0E0E0;
  --sh: 0 2px 8px rgba(0, 0, 0, .1);
  --rad: 4px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--tx);
  font-size: 14px
}

a {
  text-decoration: none;
  color: inherit
}

img {
  max-width: 100%
}

/* ---- NAVBAR ---- */
.topbar {
  background: var(--or);
  padding: 10px 0 0
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px
}

.topbar-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 10px
}

.brand {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap
}

.search-box {
  flex: 1;
  display: flex;
  max-width: 680px
}

.search-box input {
  flex: 1;
  padding: 9px 14px;
  border: none;
  border-radius: 2px 0 0 2px;
  font-size: 14px;
  outline: none
}

.search-box button {
  background: #42b549;
  color: #fff;
  border: none;
  padding: 0 18px;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
  font-size: 15px
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto
}

.topbar-nav a {
  color: rgba(255, 255, 255, .9);
  font-size: 13px;
  white-space: nowrap
}

.topbar-nav a:hover {
  color: #fff
}

.cart-btn {
  position: relative;
  color: #fff !important;
  font-size: 22px
}

.cart-num {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #f05d24;
  border: 2px solid #fff;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px
}

.nav-divider {
  color: rgba(255, 255, 255, .4)
}

.btn-nav {
  color: rgba(255, 255, 255, .9) !important;
  padding: 5px 12px;
  border-radius: 2px
}

.btn-nav-solid {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 2px;
  color: #fff !important;
  padding: 5px 14px;
  font-size: 13px
}

.btn-nav-solid:hover {
  background: rgba(255, 255, 255, .25)
}

.nav-user-name {
  color: #fff;
  font-weight: 600;
  font-size: 13px
}

/* nav category bar */
.catbar {
  background: rgba(0, 0, 0, .1);
  display: flex;
  gap: 0;
  overflow-x: auto
}

.catbar a {
  color: rgba(255, 255, 255, .85);
  padding: 8px 16px;
  font-size: 12.5px;
  white-space: nowrap
}

.catbar a:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff
}

/* ---- WRAPPER ---- */
.wrap {
  max-width: 1500px;
  margin: 0 auto;
  padding: 14px 16px;
  min-height: 60vh
}

/* ---- HERO BANNER ---- */
.hero {
  background: linear-gradient(200deg, #070807, #22c55e);
  ;
  border-radius: var(--rad);
  padding: 40px 32px;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.hero-text h1 {
  font-size: 28px;
  margin-bottom: 8px
}

.hero-text p {
  opacity: .9;
  margin-bottom: 18px;
  font-size: 15px
}

.btn-hero {
  background: #fff;
  color: var(--or);
  padding: 10px 28px;
  border-radius: 2px;
  font-weight: 800;
  font-size: 15px;
  display: inline-block
}

.btn-hero:hover {
  background: #ffe0d6
}

.hero-img {
  font-size: 80px;
  line-height: 1
}

/* ---- PROMO BAR ---- */
.promo-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px
}

.promo-card {
  background: #fff;
  border-radius: var(--rad);
  padding: 16px;
  text-align: center;
  box-shadow: var(--sh)
}

.promo-card .icon {
  font-size: 26px;
  margin-bottom: 6px
}

.promo-card .label {
  font-size: 12px;
  color: var(--mt)
}

.promo-card .val {
  font-weight: 700;
  font-size: 18px;
  color: var(--tx)
}

/* ---- SECTION ---- */
.sec-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px
}

.sec-title span {
  color: var(--or)
}

.sec-title .line {
  flex: 1;
  height: 1px;
  background: var(--bd)
}

/* ---- PRODUCT GRID ---- */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
  margin-bottom: 20px
}

.prod-card {
  background: #fff;
  border-radius: var(--rad);
  overflow: hidden;
  box-shadow: var(--sh);
  transition: box-shadow .2s, transform .2s;
  cursor: pointer
}

.prod-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
  transform: translateY(-2px)
}

.prod-img {
  background: #fff8f5;
  height: 185px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  border-bottom: 1px solid #f5f5f5
}

.prod-body {
  padding: 10px
}

.prod-name {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 37px
}

.prod-price {
  color: var(--rd);
  font-weight: 700;
  font-size: 15px
}

.prod-orig {
  color: var(--mt);
  text-decoration: line-through;
  font-size: 11.5px;
  margin-right: 4px
}

.prod-disc {
  background: #feedec;
  color: var(--rd);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px
}

.prod-stok {
  color: var(--mt);
  font-size: 11.5px;
  margin-top: 3px
}

.sold-bar-wrap {
  background: #f5f5f5;
  border-radius: 2px;
  height: 5px;
  margin-top: 6px;
  overflow: hidden
}

.sold-bar {
  background: linear-gradient(90deg, var(--or), var(--rd));
  height: 5px;
  border-radius: 2px
}

.sold-lbl {
  font-size: 10.5px;
  color: var(--mt);
  margin-top: 2px
}


.btn-cart {
  width: 100%;
  margin-top: 8px;
  padding: 7px;
  background: var(--or);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s
}

.btn-cart:hover {
  background: var(--or3)
}

.btn-cart:disabled {
  background: #ccc;
  cursor: not-allowed
}

/* ---- BADGES ---- */
.badge-cat {
  background: #fff0eb;
  color: var(--or);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 5px
}

/* ---- FILTER BAR ---- */
.filter-bar {
  background: #fff;
  border-radius: var(--rad);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: var(--sh)
}

.filter-bar input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--bd);
  border-radius: var(--rad);
  font-size: 13.5px
}

.filter-bar select {
  padding: 8px 10px;
  border: 1px solid var(--bd);
  border-radius: var(--rad);
  background: #fff;
  font-size: 13.5px;
  cursor: pointer
}

.btn-filter {
  background: var(--or);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--rad);
  font-weight: 600;
  cursor: pointer;
  font-size: 13.5px
}

.btn-reset {
  background: #fff;
  color: var(--mt);
  border: 1px solid var(--bd);
  padding: 8px 14px;
  border-radius: var(--rad);
  cursor: pointer;
  font-size: 13.5px
}

/* ---- DETAIL PRODUK ---- */
.detail-wrap {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start
}

.detail-img-box {
  background: #fff8f5;
  border-radius: var(--rad);
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 110px;
  box-shadow: var(--sh)
}

.detail-info {
  background: #fff;
  border-radius: var(--rad);
  padding: 22px;
  box-shadow: var(--sh)
}

.detail-price {
  color: var(--rd);
  font-size: 26px;
  font-weight: 700;
  margin: 10px 0
}

/* ---- FORM CARD ---- */
.form-wrap {
  max-width: 440px;
  margin: 30px auto
}

.form-card {
  background: #fff;
  border-radius: var(--rad);
  box-shadow: var(--sh);
  padding: 32px
}

.form-card h2 {
  font-size: 20px;
  margin-bottom: 20px;
  text-align: center
}

.fg {
  margin-bottom: 14px
}

.fg label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--tx)
}

.fg input,
.fg select,
.fg textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bd);
  border-radius: var(--rad);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  outline: none;
  border-color: var(--or);
  box-shadow: 0 0 0 2px rgba(232, 73, 29, .1)
}

.btn-full {
  width: 100%;
  padding: 12px;
  background: var(--or);
  color: #fff;
  border: none;
  border-radius: var(--rad);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s
}

.btn-full:hover {
  background: var(--or3)
}

.form-foot {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--mt)
}

.form-foot a {
  color: var(--or);
  font-weight: 600
}

.demo-hint {
  background: #fff8f5;
  border: 1px dashed var(--or);
  border-radius: var(--rad);
  padding: 10px 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--mt);
  margin-bottom: 16px
}

/* ---- ALERT ---- */
.alert {
  padding: 11px 15px;
  border-radius: var(--rad);
  margin-bottom: 14px;
  font-size: 13.5px;
  font-weight: 500
}

.alert-danger {
  background: #feedec;
  color: #c0392b;
  border: 1px solid #f5b7b1
}

.alert-success {
  background: #e8f5e9;
  color: #16da61;
  border: 1px solid #a9dfbf
}

.alert-info {
  background: #e8f4fd;
  color: #1a5276;
  border: 1px solid #aed6f1
}

/* ---- KERANJANG ---- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
  align-items: start
}

.cart-box {
  background: #fff;
  border-radius: var(--rad);
  box-shadow: var(--sh);
  overflow: hidden
}

.cart-head {
  background: #fff8f5;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 13.5px;
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  gap: 10px
}

.cart-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5
}

.cart-item:last-child {
  border-bottom: none
}

.cart-emoji {
  font-size: 42px;
  width: 60px;
  height: 60px;
  background: #fff8f5;
  border-radius: var(--rad);
  display: flex;
  align-items: center;
  justify-content: center
}

.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--bd);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s
}

.qty-btn:hover {
  border-color: var(--or);
  color: var(--or)
}

.qty-num {
  width: 40px;
  height: 28px;
  text-align: center;
  border: 1px solid var(--bd);
  border-left: none;
  border-right: none;
  font-size: 14px;
  outline: none
}

.btn-del {
  background: none;
  border: none;
  color: var(--mt);
  cursor: pointer;
  font-size: 12px;
  margin-top: 6px;
  display: block
}

.btn-del:hover {
  color: var(--rd)
}

/* ---- ORDER SUMMARY ---- */
.summary-box {
  background: #fff;
  border-radius: var(--rad);
  box-shadow: var(--sh);
  padding: 16px;
  position: sticky;
  top: 70px
}

.summary-box h3 {
  font-size: 14px;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bd);
  margin-bottom: 12px
}

.sum-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13.5px
}

.sum-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  color: var(--rd);
  border-top: 1px solid var(--bd);
  padding-top: 12px;
  margin-top: 12px
}

.btn-checkout {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: var(--or);
  color: #fff;
  border: none;
  border-radius: var(--rad);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer
}

.btn-checkout:hover {
  background: var(--or3)
}

/* ---- CHECKOUT ---- */
.co-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
  align-items: start
}

.co-section {
  background: #fff;
  border-radius: var(--rad);
  box-shadow: var(--sh);
  margin-bottom: 12px;
  overflow: hidden
}

.co-head {
  background: #fff8f5;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid var(--bd)
}

.co-body {
  padding: 18px
}

/* Alamat option */
.alamat-opt {
  border: 1.5px solid var(--bd);
  border-radius: var(--rad);
  padding: 12px 14px;
  cursor: pointer;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: border-color .2s
}

.alamat-opt:hover,
.alamat-opt.selected {
  border-color: var(--or);
  background: #fff8f5
}

/* Ongkir */
.ongkir-opt {
  border: 1.5px solid var(--bd);
  border-radius: var(--rad);
  padding: 11px 14px;
  cursor: pointer;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color .2s
}

.ongkir-opt:hover,
.ongkir-opt.selected {
  border-color: var(--or);
  background: #fff8f5
}

/* Metode Bayar */
.pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.pay-opt {
  border: 1.5px solid var(--bd);
  border-radius: var(--rad);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s
}

.pay-opt:hover,
.pay-opt.selected {
  border-color: var(--or);
  background: #fff8f5
}

.pay-opt .pi {
  font-size: 26px;
  margin-bottom: 4px
}

.pay-opt .pl {
  font-size: 12.5px;
  font-weight: 600
}

.pay-opt .pb {
  font-size: 11px;
  color: var(--mt)
}

/* ---- SUKSES ---- */
.sukses-wrap {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 30px 0
}

.sukses-icon {
  font-size: 70px;
  margin-bottom: 14px
}

.receipt {
  background: #fff;
  border-radius: var(--rad);
  box-shadow: var(--sh);
  overflow: hidden;
  text-align: left;
  margin: 20px 0
}

.receipt-head {
  background: var(--or);
  color: #fff;
  padding: 14px 20px
}

.receipt-body {
  padding: 18px 20px
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed #f0f0f0;
  font-size: 13.5px
}

.receipt-row:last-child {
  border: none
}

.receipt-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  color: var(--rd);
  padding-top: 10px
}

.instruksi {
  background: #fff8f5;
  border: 1px solid #ffd5c8;
  border-radius: var(--rad);
  padding: 16px 18px;
  margin: 14px 0;
  text-align: left
}

.instruksi h4 {
  color: var(--or);
  margin-bottom: 10px
}

.instruksi .rek {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--tx);
  margin: 6px 0
}

/* ---- PESANAN SAYA ---- */
.order-card {
  background: #fff;
  border-radius: var(--rad);
  box-shadow: var(--sh);
  overflow: hidden;
  margin-bottom: 12px
}

.order-head {
  background: #fff8f5;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--bd)
}

.order-kode {
  font-weight: 700;
  color: var(--or);
  font-size: 13.5px
}

.order-body {
  padding: 14px 16px
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed #f5f5f5
}

.order-item:last-child {
  border: none
}

.status-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 2px
}

.s-tunggu {
  background: #FFF3CD;
  color: #856404
}

.s-bayar {
  background: #D1ECF1;
  color: #0C5460
}

.s-proses {
  background: #CCE5FF;
  color: #004085
}

.s-kirim {
  background: #D4EDDA;
  color: #155724
}

.s-selesai {
  background: #D4EDDA;
  color: #155724
}

.s-batal {
  background: #F8D7DA;
  color: #721C24
}

/* ---- EMPTY STATE ---- */
.empty {
  text-align: center;
  padding: 60px 20px
}

.empty .ei {
  font-size: 60px;
  margin-bottom: 14px
}

.empty h3 {
  font-size: 16px;
  margin-bottom: 8px
}

.empty p {
  color: var(--mt);
  font-size: 13.5px;
  margin-bottom: 18px
}

.btn-empty {
  background: var(--or);
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--rad);
  font-weight: 600;
  display: inline-block
}

/* ---- FOOTER ---- */
.footer {
  background: #212121;
  color: rgba(255, 255, 255, .6);
  padding: 20px 0;
  margin-top: 30px;
  text-align: center;
  font-size: 12.5px
}

.footer b {
  color: var(--or)
}

/* ---- TOAST ---- */
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #323232;
  color: #fff;
  padding: 12px 20px;
  border-radius: 4px;
  z-index: 9999;
  transform: translateY(60px);
  opacity: 0;
  transition: all .3s;
  font-size: 13.5px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .3)
}

#toast.show {
  transform: translateY(0);
  opacity: 1
}

#toast.ok {
  border-left: 4px solid var(--gr)
}

#toast.err {
  border-left: 4px solid var(--rd)
}

/* ---- UTILS ---- */
.flex {
  display: flex;
  align-items: center;
  gap: 8px
}

.mt8 {
  margin-top: 8px
}

.mt14 {
  margin-top: 14px
}

.bold {
  font-weight: 700
}

.muted {
  color: var(--mt)
}

.or {
  color: var(--or)
}

.rd {
  color: var(--rd)
}

/* ---- RESPONSIVE ---- */
@media(max-width:768px) {

  .cart-layout,
  .co-layout,
  .detail-wrap {
    grid-template-columns: 1fr
  }

  .summary-box {
    position: static
  }

  .prod-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .promo-bar {
    grid-template-columns: repeat(2, 1fr)
  }

  .topbar-top {
    flex-wrap: wrap
  }

  .hero {
    flex-direction: column;
    text-align: center
  }

  .hero-img {
    display: none
  }

  .pay-grid {
    grid-template-columns: 1fr
  }

  .hero {}
}