/* ===== Gaya marketplace bersih + desain laut Ciyeon (latar ilustrasi + ikan bergerak) ===== */
:root {
  --bg:        #f4faff;
  --card:      #ffffff;
  --ink:       #0f2a3d;
  --muted:     #5f7688;
  --border:    #dbe9f3;
  --soft:      #eaf6fd;
  --primary:   #8cc6f6;   /* biru kostum hiu maskot */
  --primary-2: #bfe0fb;
  --primary-ink:#0b3550;  /* teks di atas tombol biru muda */
  --strong:    #2f8fd8;   /* link, aksen teks */
  --orange:    #f2700f;   /* oranye tulisan "Ciyeon" — judul & harga */
  --orange-2:  #ffb233;
  --teal:      #2aa9bb;
  --pink:      #ffc4da;
  --amber-bg:  #fff8e6;
  --amber-br:  #f4dc9c;
  --green:     #1f9d64;
  --radius:    14px;
  --shadow-xs: 0 1px 2px rgba(16, 42, 61, .06);
  --shadow:    0 10px 30px rgba(42, 143, 199, .14);
  --nav-h:     64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; color: var(--ink); background: #5cc3d3;
  overflow-x: hidden; min-height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }

h1, h2, h3, .brand, .fun { font-family: 'Fredoka', 'Plus Jakarta Sans', system-ui, sans-serif; }

/* ======= latar ilustrasi Ciyeon + ikan bergerak ======= */
#bg { position: fixed; inset: 0; z-index: -3; background: #5cc3d3 url(/img/bg.jpg) center / cover no-repeat; }
/* Di HP (layar sempit) pakai gambar versi vertikal supaya tidak terpotong. */
@media (max-width: 820px) { #bg { background-image: url(/img/bg-mobile.jpg); } }
#bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 40%, rgba(20,90,120,.12)); }

#ocean { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.sprite { position: absolute; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 5px 6px rgba(18, 80, 110, .2)); }
.sprite svg { display: block; width: 100%; height: auto; overflow: visible; }
.sprite .tail { animation: wag .42s ease-in-out infinite alternate; }
.fish .tail { transform-origin: 36px 35px; }
.dolphin .tail { transform-origin: 36px 58px; animation-duration: .9s; }
@keyframes wag { from { transform: rotate(-15deg); } to { transform: rotate(15deg); } }
.jelly { filter: drop-shadow(0 0 10px rgba(255,255,255,.55)); }
.jelly svg { animation: pulse 2.4s ease-in-out infinite; transform-origin: 50% 20%; }
.jelly .tent { transform-origin: 50px 52px; animation: sway 2.4s ease-in-out infinite alternate; }
@keyframes pulse { 50% { transform: scale(1.06, .93); } }
@keyframes sway { from { transform: skewX(-9deg); } to { transform: skewX(9deg); } }
.school { height: 70px; color: #1d7d97; opacity: .38; filter: none; }
.school span { position: absolute; width: 26px; }
.bubble {
  position: absolute; bottom: -40px; border-radius: 50%; animation: rise linear infinite;
  background: radial-gradient(circle at 32% 30%, #fff 0 14%, rgba(255,255,255,.3) 32%, rgba(255,255,255,.06) 70%);
  border: 1.5px solid rgba(255,255,255,.8);
}
@keyframes rise { to { transform: translate(var(--dx, 0), -120vh); } }
#ocean.still .bubble, #ocean.still .tail, #ocean.still svg, #ocean.still .tent { animation: none; }

/* ======= layout ======= */
.wrap { max-width: 1152px; margin: 0 auto; padding-inline: 16px; }
.section {
  width: min(1120px, calc(100% - 32px)); margin: 18px auto; padding: clamp(18px, 3vw, 28px);
  background: rgba(255,255,255,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.85); border-radius: 24px; box-shadow: 0 12px 34px rgba(16, 80, 110, .18);
}
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section h2, .sec-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 700; color: var(--orange); letter-spacing: .01em; }
.section .sub { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.sec-head .sub { margin-bottom: 0; }
.more { color: var(--strong); font-weight: 600; font-size: .9rem; text-decoration: none; }

/* ======= navbar ======= */
nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
nav .bar { display: flex; align-items: center; gap: 22px; min-height: var(--nav-h); flex-wrap: wrap; padding-block: 8px; }
nav .brand { font-weight: 800; font-size: 1.1rem; display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--ink); }
nav .brand .logo {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary);
}
nav .brand .logo img { width: 100%; height: 100%; object-fit: cover; }
nav .brand { font-size: 1.3rem; font-weight: 700; color: var(--orange); }
.navlinks { display: flex; gap: 20px; font-size: .9rem; flex-wrap: wrap; }
.navlink {
  position: relative; text-decoration: none; color: var(--muted); font-weight: 500; transition: color .2s;
}
.navlink::after {
  content: ''; position: absolute; inset-inline: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.navlink:hover, .navlink.active { color: var(--ink); }
.navlink:hover::after, .navlink.active::after { transform: scaleX(1); }
nav .links { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
nav .links a:not(.btn), .linkbtn {
  color: var(--muted); text-decoration: none; font-size: .88rem; font-family: inherit; font-weight: 500;
  padding: 6px 10px; border-radius: 8px; background: none; border: none; cursor: pointer;
}
nav .links a:not(.btn):hover, .linkbtn:hover { background: var(--soft); color: var(--ink); }

.announce { background: var(--amber-bg); border-bottom: 1px solid var(--amber-br); font-size: .85rem; color: #6b5310; }
.announce .wrap { padding-block: 9px; display: flex; gap: 8px; align-items: center; }

/* ======= buttons ======= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  font-weight: 700; font-family: inherit; font-size: .9rem; text-decoration: none; white-space: nowrap;
  background: linear-gradient(180deg, #9fd0fa, #6fb3ef); color: #0b3550; box-shadow: inset 0 -3px 0 rgba(30, 100, 170, .25);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: inset 0 -3px 0 rgba(30,100,170,.25), 0 6px 18px rgba(47,143,216,.3); }
.btn.orange { background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #fff; box-shadow: inset 0 -3px 0 rgba(160, 60, 0, .3); }
.btn.ghost { background: #fff; border-color: var(--border); color: var(--ink); box-shadow: var(--shadow-xs); }
.btn.ghost:hover { background: var(--soft); }
.btn.pink { background: var(--pink); color: #5a2440; }
.btn.pink:hover { background: #ffb3cf; }
.btn.small { padding: 6px 12px; font-size: .8rem; border-radius: 8px; }
.btn.lg { padding: 13px 22px; font-size: .95rem; border-radius: 12px; }
.btn.full { width: 100%; margin-top: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ======= kartu dasar ======= */
.glass, .card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.grid { display: grid; gap: 14px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }

/* ======= hero ======= */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: center; padding-block: 44px 20px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero-art { order: -1; max-width: 420px; margin: 0 auto; width: 100%; } }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border); font-size: .8rem; font-weight: 600; color: var(--muted); box-shadow: var(--shadow-xs);
}
.hero-copy { padding: clamp(20px, 3.5vw, 34px); border-radius: 26px; background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 12px 34px rgba(16,80,110,.18); }
.hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.4rem); line-height: 1.05; font-weight: 700; margin-top: 14px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 4px 10px rgba(242,112,15,.2)); }
.hero h1 .hl { color: var(--strong); }
.hero .lead { color: var(--muted); font-size: 1.05rem; margin-top: 14px; max-width: 34em; line-height: 1.6; }
.trust { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.trust .pill { color: var(--ink); }
.trust .pill b { color: var(--green); }
.hero .ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-art {
  position: relative; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden;
  border: 6px solid #fff; box-shadow: 0 0 0 4px var(--primary), 0 18px 40px rgba(16,80,110,.3);
  animation: float 5s ease-in-out infinite;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-art .mascot { font-size: clamp(6rem, 18vw, 9.5rem); animation: float 4s ease-in-out infinite; filter: drop-shadow(0 14px 18px rgba(42,143,199,.3)); }
.hero-art .f { position: absolute; font-size: 2rem; animation: float 5s ease-in-out infinite; }
.hero-art .f1 { top: 14%; left: 12%; animation-delay: -1s; }
.hero-art .f2 { top: 22%; right: 12%; font-size: 1.6rem; animation-delay: -2.5s; }
.hero-art .f3 { bottom: 16%; left: 18%; font-size: 1.5rem; animation-delay: -3.5s; }
.hero-art .f4 { bottom: 12%; right: 16%; animation-delay: -.5s; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
@media (prefers-reduced-motion: reduce) { .hero-art { animation: none; } }

/* ======= stats ======= */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; }
.stats .card { background: rgba(255,255,255,.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.stat b { display: block; font-family: 'Fredoka', sans-serif; font-size: 1.7rem; font-weight: 700; color: var(--orange); }
.stat span { color: var(--muted); font-size: .82rem; }

/* ======= auth (tampilan 1) ======= */
.auth-card { padding: 22px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 10px; padding: 4px; margin-bottom: 6px; }
.seg button { border: none; background: none; padding: 8px; border-radius: 8px; font-family: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); }
.welcome { padding: 22px; }

/* ======= transaksi terbaru ======= */
.feed { padding: 6px 16px; }
.feed-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.feed-row:last-child { border-bottom: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none;
  background: linear-gradient(135deg, var(--primary-2), var(--pink)); color: var(--primary-ink); }
.feed-row .txt { flex: 1; min-width: 0; font-size: .85rem; }
.feed-row .txt div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-row .amt { font-weight: 800; color: var(--orange); font-size: .88rem; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; box-shadow: 0 0 0 3px rgba(31,157,100,.15); }

/* ======= katalog ======= */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input { max-width: 260px; margin-top: 0; }
.cats { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: .72rem; padding: 3px 9px; border-radius: 999px; font-family: inherit;
  background: var(--soft); border: 1px solid var(--border); color: var(--muted);
}
.cats .chip { font-size: .82rem; padding: 6px 13px; cursor: pointer; font-weight: 600; background: #fff; }
.cats .chip.on { background: var(--orange); color: #fff; border-color: var(--orange); }
.catalog { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pcard {
  display: flex; flex-direction: column; text-align: left; cursor: pointer; overflow: hidden; padding: 0;
  font-family: inherit; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.pcard .thumb {
  position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 3rem;
  background: radial-gradient(circle at 50% 40%, #ffffff, #d4effa 70%, #b7e3f4); border-bottom: 1px solid var(--border);
}
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pcard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pname { font-weight: 700; font-size: .88rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pmeta { color: var(--muted); font-size: .74rem; }
.pfrom { color: var(--orange); font-weight: 800; font-size: .95rem; margin-top: auto; padding-top: 4px; }
.pfrom small { color: var(--muted); font-weight: 500; font-size: .7rem; }
.tag { position: absolute; top: 8px; left: 8px; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.tag.ready { background: #dcf7ea; color: #17784b; }
.tag.habis { background: #ffe1ea; color: #a2416a; }
.pimg {
  width: 72px; height: 72px; border-radius: 14px; overflow: hidden; flex: none;
  display: grid; place-items: center; font-size: 2.3rem;
  background: linear-gradient(135deg, #f1fafe, #d8f0fb); border: 1px solid var(--border);
}
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pimg.big { width: 92px; height: 92px; font-size: 3rem; }

/* ======= modal produk: pilih paket ======= */
.pm-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.pm-head h3 { font-size: 1.15rem; font-weight: 800; }
.variants { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin: 8px 0 14px; }
.variant {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  padding: 10px 12px; border-radius: 12px; cursor: pointer; font-family: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--border);
}
.variant span { color: var(--strong); font-weight: 800; font-size: .92rem; }
.variant small { color: var(--muted); font-size: .72rem; }
.variant.on { border-color: var(--strong); background: #f0f9fe; box-shadow: 0 0 0 3px rgba(143,211,244,.35); }
.variant:disabled { opacity: .45; cursor: not-allowed; }
.between { justify-content: space-between; }
.price { font-size: 1.3rem; color: var(--orange); font-weight: 800; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--soft); border: 1px solid var(--border); color: var(--muted); }

/* ======= detail akun setelah lunas ======= */
.delivery { padding: 14px; margin-top: 12px; text-align: left; }
.delivery .item { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between;
  background: #f4fbff; border: 1px dashed var(--strong); border-radius: 10px; padding: 10px; margin-top: 8px; }
.delivery pre { white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }

/* ======= admin profile ======= */
.admin-card { padding: 22px; text-align: center; }
.admin-card .photo {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 12px; overflow: hidden;
  background: linear-gradient(135deg, #e6f6fe, var(--primary)); display: grid; place-items: center; font-size: 2.4rem;
  border: 3px solid #fff; box-shadow: 0 0 0 2px var(--primary-2), var(--shadow);
}
.admin-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.admin-card .role { display: inline-block; margin-top: 4px; }

/* ======= accordion (materi & FAQ) ======= */
.acc details { border-bottom: 1px solid var(--border); }
.acc details:last-child { border-bottom: none; }
.acc summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; font-weight: 700; padding: 14px 16px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '⌄'; margin-left: auto; color: var(--muted); transition: transform .2s; font-size: 1.1rem; }
.acc details[open] summary::after { transform: rotate(180deg); }
.acc summary .pimg { width: 40px; height: 40px; font-size: 1.3rem; border-radius: 10px; }
.acc .body { white-space: pre-wrap; color: var(--muted); font-size: .9rem; line-height: 1.65; padding: 0 16px 16px; }

/* ======= review ======= */
.review { padding: 16px; }
.review .stars { color: #f2b13a; letter-spacing: 1px; }
.review .who { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 700; font-size: .88rem; }
.review .who .avatar { width: 30px; height: 30px; font-size: .75rem; }
.review p { margin-top: 8px; font-size: .9rem; line-height: 1.55; }

/* ======= CTA band ======= */
.cta {
  border-radius: 26px; padding: clamp(24px, 5vw, 44px); text-align: center; margin-block: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(214,240,255,.9)); border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--primary), 0 14px 36px rgba(16,80,110,.22);
}
.cta h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 700; color: var(--orange); }
.cta p { color: #2f5671; margin-top: 6px; }
.cta .row { justify-content: center; margin-top: 18px; }


/* ======= forms ======= */
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--border);
  color: var(--ink); font-family: inherit; font-size: .92rem; margin-top: 5px;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(143,211,244,.45); border-color: var(--strong); }
label { font-size: .82rem; color: var(--muted); display: block; margin-top: 10px; font-weight: 600; }
.form-box { padding: 22px; max-width: 440px; margin: 0 auto; }

/* ======= modal ======= */
.modal-bg { position: fixed; inset: 0; background: rgba(15,42,61,.35); z-index: 100; display: none; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal-bg.show { display: grid; }
.modal { max-width: 480px; width: 100%; padding: 22px; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(15,42,61,.25); }
.modal.wide { max-width: 760px; }
.modal h2 { font-weight: 800; font-size: 1.3rem; }
.close-x { float: right; cursor: pointer; color: var(--muted); font-size: 1.5rem; background: none; border: none; line-height: 1; }

/* ======= giftcard ======= */
.giftcard { padding: 20px; text-align: center; margin-top: 14px; border-radius: var(--radius);
  background: linear-gradient(135deg, #ffe6f0, #e3f5fe 60%, #ede7ff); border: 2px dashed var(--pink); }
.giftcard .gc-title { font-size: 1.05rem; color: #c2557f; font-weight: 800; }
.giftcard .gc-code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .08em; margin-top: 8px; }

/* ======= points pill ======= */
.points-pill { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px;
  background: #fff7dc; border: 1px solid #f1d27b; color: #85600f; font-size: .8rem; font-weight: 700; }

/* ======= pesanan ======= */
.orders { display: grid; gap: 8px; }
.order-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; }
.status { font-size: .72rem; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.status.paid { background: #dcf7ea; color: #17784b; }
.status.unpaid { background: #fff1cf; color: #85600f; }
.status.expired, .status.cancelled { background: #ffe1ea; color: #a2416a; }

/* ======= footer ======= */
footer { margin-top: 40px; background: #fff; border-top: 1px solid var(--border); font-size: .88rem; }
.foot { display: grid; gap: 24px; grid-template-columns: 1.4fr repeat(3, 1fr); padding-block: 36px; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }
.foot h4 { font-size: .85rem; margin-bottom: 10px; }
.foot a { display: block; color: var(--muted); text-decoration: none; padding: 3px 0; }
.foot a:hover { color: var(--strong); }
.foot .muted { line-height: 1.6; }
.paybadge { display: inline-flex; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; font-weight: 800; letter-spacing: .04em; font-size: .8rem; }
.copy { border-top: 1px solid var(--border); padding-block: 16px; color: var(--muted); font-size: .8rem; text-align: center; }

/* ======= chibi theme overrides ======= */
body.chibi { --radius: 22px; }
body.chibi .btn { border-radius: 999px; }
body.chibi .pcard .thumb, body.chibi .pimg { border-radius: 18px; }
body.chibi .pcard:hover { transform: translateY(-4px) rotate(-1deg) scale(1.02); }

.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toast {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  padding: 12px 18px; border-radius: 12px; z-index: 200; pointer-events: none; max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; font-weight: 600; font-size: .88rem;
  box-shadow: 0 10px 30px rgba(15,42,61,.3); opacity: 0; transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }
.qr-box { text-align: center; padding: 14px; }
.qr-box .code { word-break: break-all; font-size: .72rem; color: var(--muted); background: var(--soft); padding: 10px; border-radius: 8px; margin-top: 10px; }

/* ======= admin ======= */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; }
.vrow { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--border); }
.vrow .acts { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 520px) { .vrow { grid-template-columns: 1fr 1fr; } .vrow .acts { grid-column: 1 / -1; } }

/* ======= kartu reseller (tampilan 2) ======= */
.reseller { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
.reseller img { width: 100%; border-radius: 20px; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--primary); }
@media (max-width: 560px) { .reseller { grid-template-columns: 1fr; text-align: center; } .reseller img { max-width: 220px; margin: 0 auto; } }

/* ======= bingkai QRIS "Scan Here!" ======= */
.qr-frame { position: relative; width: 100%; max-width: 380px; margin: 12px auto 0; aspect-ratio: 1 / 1;
  background: url(/img/qr-frame.jpg) center / cover; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 26px rgba(16,80,110,.25); }
.qr-frame .slot { position: absolute; left: 12.4%; top: 43.2%; width: 44.2%; height: 41.8%; display: grid; place-items: center; }
.qr-frame .slot svg, .qr-frame .slot img { width: 88%; height: 88%; object-fit: contain; }
.qr-frame .slot .code { font-size: .6rem; padding: 6px; margin: 0; background: none; max-height: 100%; overflow: hidden; }

/* ======= huruf kecil semua, kecuali nama toko (CIYEON STORE) ======= */
body.lower { text-transform: lowercase; }
body.lower [data-store-name] { text-transform: uppercase; }
/* data yang peka huruf besar/kecil tetap tampil apa adanya */
body.lower .kc, body.lower pre, body.lower code, body.lower .gc-code,
body.lower input, body.lower textarea, body.lower .qr-frame { text-transform: none; }

/* ======= channel whatsapp (tampilan 2) ======= */
.channel { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ch-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; flex: none;
  background: linear-gradient(180deg, #8ff0b8, #25d366); border: 3px solid #fff; box-shadow: 0 0 0 3px #b9f3cf; }

/* ======= ikon WhatsApp ======= */
.wa-ic { width: 1.3em; height: 1.3em; vertical-align: -.3em; flex: none; }
.foot a .wa-ic { margin-right: 4px; }
.ch-icon { background: none; box-shadow: none; border: none; border-radius: 0; }
.ch-icon img { width: 100%; height: 100%; object-fit: contain; }

/* ======= pembayaran manual (QRIS statis) ======= */
.pay-amount { margin: 12px 0 10px; padding: 10px 14px; border-radius: 12px; text-align: center;
  background: #fff4e5; border: 1px solid #ffd59a; color: #8a4b00; font-size: .95rem; }
.pay-amount b { font-size: 1.35rem; color: var(--orange); }
.qris-static { display: block; width: 100%; max-width: 380px; margin: 0 auto; border-radius: 18px;
  box-shadow: 0 10px 26px rgba(16,80,110,.25); }
.pay-steps { margin: 14px 0 4px 20px; font-size: .88rem; line-height: 1.7; color: var(--ink); }

/* ======= keranjang ======= */
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; font-family: inherit; font-weight: 700; font-size: .85rem; color: var(--ink); cursor: pointer; }
.cart-btn:hover { background: var(--soft); }
.cart-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--orange); color: #fff; font-size: .72rem; }
/* Pusat Tutorial / Pengetahuan */
.kb-item { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-xs); padding: 16px 18px; margin-bottom: 14px; }
.kb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kb-head h3 { font-size: 1.1rem; color: var(--ink); margin: 0; line-height: 1.3; }
.kb-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .78rem; color: var(--muted); margin: 6px 0 10px; }
.kb-cat { background: var(--soft); color: var(--strong); border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.kb-role { background: #fff2e6; color: var(--orange); border-radius: 999px; padding: 1px 8px; font-weight: 700; font-size: .7rem; }
.kb-body { white-space: pre-wrap; color: var(--ink); font-size: .9rem; line-height: 1.65; }
.kb-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kb-photos a { display: block; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.kb-photos img { width: 100%; height: 100%; object-fit: cover; }

/* Token OTP di detail pesanan */
.otp-deliv { margin-top: 10px; padding: 12px; border-radius: 12px; background: linear-gradient(180deg,#fff7ef,#ffeede); border: 1px solid #ffd3bf; }
.otp-deliv b { color: var(--orange); }
.otp-deliv .item pre { font-family: ui-monospace, Menlo, monospace; letter-spacing: .12em; font-weight: 700; }

/* Lonceng notifikasi */
.bell-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; font-size: 1.05rem; cursor: pointer; color: var(--ink); }
.bell-btn:hover { background: var(--soft); }
.bell-btn.ring-anim { animation: bellring .6s ease; }
@keyframes bellring { 0%,100%{transform:rotate(0)} 20%{transform:rotate(16deg)} 40%{transform:rotate(-14deg)} 60%{transform:rotate(10deg)} 80%{transform:rotate(-6deg)} }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: inline-grid; place-items: center; background: #e5484d; color: #fff; font-size: .68rem; font-weight: 700; }
.notif-panel { position: fixed; top: 64px; right: 14px; width: min(360px, calc(100vw - 28px)); max-height: 72vh; z-index: 60;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 50px rgba(15,42,61,.22); overflow: hidden; display: flex; flex-direction: column; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-head b { font-family: 'Fredoka', sans-serif; color: var(--ink); }
.notif-push { padding: 10px 12px; border-bottom: 1px solid var(--border); background: #fafdff; }
.btn.small.full { width: 100%; justify-content: center; }
.notif-list { overflow-y: auto; }
.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; }
.notif-item.unread { background: #fff6ef; }
.notif-item .ic { font-size: 1.1rem; flex-shrink: 0; }
.notif-item .t { font-weight: 700; font-size: .9rem; color: var(--ink); }
.notif-item .b { font-size: .82rem; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.notif-item .time { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.notif-empty { padding: 28px 14px; text-align: center; color: var(--muted); font-size: .88rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 34px; height: 34px; border: none; background: var(--soft); font-size: 1.1rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.qty button:disabled { opacity: .4; cursor: not-allowed; }
.qty span { min-width: 36px; text-align: center; font-weight: 700; }
.cart-line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-line .pimg { width: 48px; height: 48px; font-size: 1.5rem; border-radius: 12px; }
.cart-line .info { flex: 1; min-width: 0; font-size: .88rem; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-weight: 700; }
.pay-lines { margin: 10px 0 0; font-size: .86rem; }
.pay-lines div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }

/* ======= review oleh pembeli ======= */
.star-pick { display: flex; gap: 4px; font-size: 1.8rem; margin: 6px 0; }
.star-pick button { background: none; border: none; cursor: pointer; color: #d9e3ea; padding: 0; line-height: 1; }
.star-pick button.on { color: #f2b13a; }
.deliv-note { white-space: pre-wrap; font-size: .86rem; line-height: 1.65; color: var(--ink); background: #f6fbff;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.admin-card a.photo { display: grid; text-decoration: none; }

/* ======= S&K per paket (editor admin) ======= */
.vwrap { border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.vwrap .vrow { border-bottom: none; }
.vsnk summary { cursor: pointer; font-size: .84rem; font-weight: 600; color: var(--strong); padding: 4px 0; }
.snk-block { white-space: pre-wrap; font-size: .85rem; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.snk-block + .snk-block { margin-top: 10px; }

/* ======= paket dikelompokkan per jenis ======= */
.vgroup { margin: 14px 0 0; font-size: .8rem; font-weight: 800; color: var(--orange); letter-spacing: .02em; }
.vgroup + .variants { margin-top: 6px; }

.btn.danger { color: #b3264f; border-color: #f3c2d2; }
.btn.danger:hover { background: #ffe8ef; }

.confirm-bg { z-index: 150; }
.btn.danger-solid { background: #d6336c; color: #fff; box-shadow: inset 0 -3px 0 rgba(120,0,40,.3); }
.btn.danger-solid:hover { background: #c2255c; }

/* ======= gambar katalog: bingkai Ciyeon + logo di layar ======= */
.framed { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; container-type: inline-size; }
.framed .frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* posisi layar hitam di gambar (diukur dari ilustrasi: kiri 39,7% · atas 59,5% · ±19,7%) */
.framed .screen {
  position: absolute; left: 40.2%; top: 60%; width: 18.8%; height: 18.6%;
  display: grid; place-items: center; overflow: hidden; border-radius: 10%;
  background: #111; font-size: 11cqw; line-height: 1;
}
.framed .screen img { width: 100%; height: 100%; object-fit: cover; }
.pcard .thumb { width: 100%; aspect-ratio: 1 / 1; padding: 0; display: block; overflow: hidden; }
.pcard .thumb .tag { z-index: 2; }
.pm-frame { width: 132px; flex: none; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }

/* ======= tampilan HP (gaya tetap sama) ======= */
@media (max-width: 760px) {
  .btn { white-space: normal; text-align: center; }
  .wrap { padding-inline: 12px; }
  .section { width: calc(100% - 20px); padding: 18px 14px; margin-block: 12px; }

  /* navbar: baris 1 = logo + tombol, baris 2 = menu */
  nav .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding-block: 8px; min-height: 0; }
  nav .brand { min-width: 0; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  nav .brand .logo { width: 32px; height: 32px; flex: none; }
  nav .links { grid-column: 2; grid-row: 1; margin-left: 0; flex-wrap: nowrap; gap: 6px; max-width: 58vw; overflow-x: auto; scrollbar-width: none; }
  nav .links a:not(.btn), .linkbtn { padding: 5px 8px; font-size: .8rem; }
  .cart-btn { padding: 6px 10px; font-size: .8rem; white-space: nowrap; }
  #auth-links .muted { display: none; }
  .navlinks { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .navlink { text-align: center; padding: 7px 4px; border-radius: 10px; background: rgba(255, 255, 255, .7); font-size: .85rem; }
  .navlink::after { display: none; }
  .navlink.active { background: var(--primary); color: var(--primary-ink); font-weight: 700; }

  /* beranda */
  .hero { padding-block: 24px 10px; gap: 16px; }
  .hero h1 { font-size: 1.9rem; }
  .hero-art { max-width: 210px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px; }
  .stat b { font-size: 1.35rem; }

  /* katalog: 2 kolom, gambar kotak penuh */
  .toolbar { gap: 8px; }
  .toolbar input { max-width: none; }
  .cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; width: 100%; }
  .cats .chip { flex: none; }
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard .body { padding: 8px 10px 10px; }
  .pname { font-size: .85rem; }
  .pm-frame { width: 96px; }
  .pm-head { align-items: flex-start; }
  .variants { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* info & tools */
  #admins { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #admins .admin-card { padding: 14px 8px; }
  #admins .admin-card .photo { width: 76px; height: 76px; }
  .reseller { grid-template-columns: 1fr; text-align: center; }
  .reseller img { max-width: 200px; margin: 0 auto; }
  .channel { flex-direction: column; text-align: center; }
  .grid.cols-2 { grid-template-columns: 1fr; }

  /* modal & footer */
  .modal-bg { padding: 10px; }
  .modal { max-height: calc(100dvh - 20px); padding: 18px 16px; }
  .foot { grid-template-columns: 1fr 1fr; gap: 18px; }
  .announce .wrap { font-size: .8rem; }
}
@media (max-width: 360px) {
  .catalog { gap: 8px; }
  nav .brand { font-size: .95rem; }
}
@media (max-width: 760px) {
  .cart-btn .cart-label { display: none; }
  .cart-btn { padding: 6px 9px; }
  #auth-links { flex-wrap: nowrap; gap: 6px; }
  #auth-links .btn { padding: 6px 10px; }
  nav .links { max-width: none; }
}

/* ======= logo dipegang Ciyeon (versi 2) =======
   katalog-frame.jpg sudah di-zoom; logo mengisi seluruh layar hitam,
   lalu katalog-hands.png (jari & lengan) ditumpuk di atasnya. */
.framed .screen { left: 36.53%; top: 48.21%; width: 27.37%; height: 27.05%; border-radius: 6%; background: #fff; font-size: 16cqw; }
.framed .screen img { width: 100%; height: 100%; object-fit: cover; }
.framed .hands { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pcard .thumb .framed .hands { width: 100%; height: 100%; object-fit: fill; }

/* ======= form join reseller ======= */
.rs-syarat { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: #fff8e8; border: 1px solid #f1dfae; font-size: .88rem; }
.rs-syarat ol { margin: 6px 0 0 18px; line-height: 1.6; }
.rs-hint { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.req { color: #d6336c; }
.rs-pick { display: inline-flex; margin-top: 6px; cursor: pointer; }
.rs-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-top: 10px; }
.rs-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.rs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; cursor: pointer; }
.rs-admin-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rs-admin-thumbs a img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }

.rs-ask { margin-top: 14px; padding: 12px 14px; border-radius: 12px; text-align: center;
  background: #f0f8ff; border: 1px dashed var(--strong); font-size: .9rem; }
.rs-ask span { display: block; color: var(--muted); margin-bottom: 4px; }
.rs-ask a { display: inline-flex; align-items: center; gap: 6px; color: var(--strong); font-weight: 700; text-decoration: none; }
.rs-ask a:hover { text-decoration: underline; }

/* tombol "📦 Pesanan saya" di navbar */
.nav-orders { font-weight: 700; color: var(--strong) !important; white-space: nowrap; }
#my-orders-sec { scroll-margin-top: 90px; }
@media (max-width: 760px) {
  .nav-orders .lbl { display: none; }
  .nav-orders { font-size: 1.05rem !important; }
  #my-orders-sec { scroll-margin-top: 130px; }
}

@media (max-width: 760px) {
  #auth-links .points-pill { padding: 4px 8px; }
  #auth-links .points-pill .lbl { display: none; }
  #auth-links { gap: 4px; }
  #auth-links .linkbtn { padding: 5px 6px; }
}

/* tombol "📦 Pesanan saya" — gaya sama dengan tombol keranjang */
.cart-btn.nav-orders { color: var(--ink) !important; font-weight: 700; font-size: .88rem; }
@media (max-width: 760px) { .cart-btn.nav-orders { padding: 6px 9px; font-size: .8rem !important; } }

.rs-q { margin-top: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fbfdff; }
.rs-q > label:first-child { margin-top: 0; }
.rs-seg { margin: 8px 0 4px; }
.rs-count { font-size: .8rem; margin-top: 6px; }
.rs-admin-text { white-space: pre-wrap; word-break: break-word; font-size: .84rem; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: #f6f9fc; border: 1px solid var(--border); }

/* ======= bar info berjalan (marquee) + best seller ======= */
.announce { overflow: hidden; }
.announce .marquee { display: flex; width: max-content; gap: 0; animation: marquee 22s linear infinite; }
.announce .marquee span { white-space: nowrap; padding-right: 40px; font-weight: 600; }
.announce:hover .marquee { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .announce .marquee { animation: none; } }
/* Best Seller di kanan atas (Ready/Habis tetap di kiri atas) */
.tag.best { left: auto; right: 8px; background: linear-gradient(135deg, #ff8a3d, #ff5a5a); color: #fff;
  box-shadow: 0 2px 8px rgba(255,90,90,.4); font-weight: 700; }

.rf-estimate { background: #fff4e5; border: 1px solid #ffd59a; border-radius: 12px; padding: 12px 14px; margin: 6px 0; text-align: center; }

.gr-note { background: #fff4f0; border: 1px solid #ffd0c4; border-radius: 12px; padding: 12px 14px; margin: 10px 0 4px; font-size: .84rem; color: #7a3a2a; }
.gr-note ul { margin: 6px 0 0 18px; line-height: 1.6; }

.gr-info { padding: 22px; display: flex; flex-direction: column; }
.gr-info h3 { color: var(--orange); font-size: 1.15rem; margin-bottom: 8px; }
.gr-info ul { margin: 0 0 16px 18px; line-height: 1.7; color: #3a5a70; font-size: .9rem; flex: 1; }
.gr-info .btn { margin-top: auto; }

.gr-acc { background: #fff6f0; border: 1px solid #ffd3bf; border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
.gr-acc > b { color: #b3540a; } .gr-acc small { display: block; color: #8a6a55; font-size: .78rem; margin: 2px 0 4px; }
