:root{
  --rose:#c2255c; --rose-d:#a01d4b; --rose-l:#fdf0f4; --ink:#22181c; --mut:#7a6b70; --line:#eee3e6;
  --bg:#fffafb; --card:#fff; --ok:#1f8a4c; --warn:#b7791f; --bad:#c92a2a; --r:14px;
  --shadow:0 6px 24px rgba(120,30,60,.08);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;padding-bottom:calc(64px + env(safe-area-inset-bottom))}
h1,h2,h3{margin:0;line-height:1.2;text-wrap:balance}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
img{max-width:100%;display:block}
[hidden]{display:none!important}
.wrap{max-width:1240px;margin:0 auto;padding:0 16px}
.muted{color:var(--mut)} .small{font-size:12px} .pad{padding:32px 0;text-align:center;grid-column:1/-1}

/* header */
.top{position:sticky;top:0;z-index:30;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.top-in{display:flex;align-items:center;gap:12px;height:60px}
.brand{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--ink);flex-shrink:0}
.brand-mark{background:var(--rose);color:#fff;font-weight:800;letter-spacing:.5px;padding:6px 9px;border-radius:10px;font-size:14px}
.brand-txt{font-weight:700;line-height:1.1;display:none}
.brand-txt small{display:block;font-weight:500;font-size:11px;color:var(--mut)}
.search{flex:1;display:flex;align-items:center;gap:8px;background:#f6eef0;border-radius:999px;padding:0 14px;height:40px;min-width:0}
.search svg{width:18px;height:18px;fill:none;stroke:var(--mut);stroke-width:2;flex-shrink:0}
.search input{border:0;background:none;outline:0;width:100%;min-width:0}
.top-nav{display:flex;align-items:center;gap:4px}
.top-nav .link{display:none;border:0;background:none;padding:8px 10px;border-radius:8px;font-weight:600}
.top-nav .link:hover{background:var(--rose-l);color:var(--rose)}
.cart-btn{position:relative;border:0;background:none;width:42px;height:42px;border-radius:50%;display:none;place-items:center}
.cart-btn svg,.tabbar svg,.mic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.badge{position:absolute;top:2px;right:0;background:var(--rose);color:#fff;font-size:11px;min-width:18px;height:18px;border-radius:9px;display:grid;place-items:center;padding:0 4px}

/* hero */
.hero{margin:12px 0 4px;border-radius:18px;padding:18px 18px;background:linear-gradient(135deg,#fde4ec 0%,#fff3e6 100%)}
.eyebrow{margin:0 0 8px;font-size:12px;font-weight:700;letter-spacing:.4px;color:var(--rose);text-transform:uppercase}
.hero h1{font-size:21px;max-width:18ch}
.hero-sub{margin:6px 0 12px;color:#5b4a50;max-width:46ch;font-size:14px}
.hero .btn.ghost{display:none}
#all,#mostWrap{scroll-margin-top:72px}
.hero-cta{display:flex;gap:10px;flex-wrap:wrap}
.btn{border:1px solid var(--line);background:#fff;border-radius:999px;padding:10px 18px;font-weight:700;text-decoration:none;color:var(--ink);display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px}
.btn.primary{background:var(--rose);border-color:var(--rose);color:#fff}
.btn.primary:hover{background:var(--rose-d)}
.btn.ghost{background:rgba(255,255,255,.7)}
.btn.danger{background:var(--bad);border-color:var(--bad);color:#fff}
.btn.block{width:100%}
.btn:disabled{opacity:.55;cursor:not-allowed}

.sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:20px 0 10px}
.sec-head h2{font-size:20px}

/* most wanted: geser horizontal di HP, grid di desktop */
.rail{display:grid;grid-auto-flow:column;grid-auto-columns:44%;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px;margin:0 -16px;padding-left:16px;padding-right:16px;scrollbar-width:none}
.rail::-webkit-scrollbar{display:none}
.rail .card{scroll-snap-align:start}

.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;margin:0 -16px;padding-left:16px;padding-right:16px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex-shrink:0;border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 14px;font-weight:600;font-size:14px;white-space:nowrap}
.chip.on{background:var(--ink);border-color:var(--ink);color:#fff}
.toolbar{display:flex;justify-content:flex-end;margin:10px 0}
.toolbar select{border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:#fff}

.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;display:flex;flex-direction:column;text-align:left;padding:0;position:relative;transition:box-shadow .15s,transform .15s}
.card:hover{box-shadow:var(--shadow);transform:translateY(-2px)}
.card .ph{aspect-ratio:1;background:#f8eef1;width:100%;object-fit:cover;font-size:0;color:transparent}
.card .info{padding:10px 10px 12px;display:flex;flex-direction:column;gap:4px;flex:1}
.card .nm{font-size:13.5px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
.price{font-weight:800;color:var(--rose);font-size:16px}
.was{color:var(--mut);text-decoration:line-through;font-size:12px;font-weight:500;margin-left:6px}
.meta{font-size:12px;color:var(--mut);margin-top:auto}
.tag{position:absolute;top:8px;left:8px;background:var(--ink);color:#fff;font-size:11px;font-weight:700;padding:3px 8px;border-radius:999px}
.tag.off{left:auto;right:8px;background:var(--rose)}
.add{margin-top:8px;border:1px solid var(--rose);background:#fff;color:var(--rose);border-radius:10px;padding:8px;font-weight:700;width:100%}
.add:hover{background:var(--rose);color:#fff}
.add:disabled{border-color:var(--line);color:var(--mut);background:#f7f3f4}

.foot{margin-top:40px;padding:24px 0;border-top:1px solid var(--line);background:#fff}
.foot p{margin:6px 0 0}

/* tab bawah (HP) */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:35;background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);padding-bottom:env(safe-area-inset-bottom)}
.tabbar button{border:0;background:none;padding:8px 0 6px;font-size:11px;font-weight:600;color:var(--mut);display:flex;flex-direction:column;align-items:center;gap:2px;position:relative}
.tabbar .tab-ai{color:var(--rose)}
.tabbar .badge{right:calc(50% - 22px)}

/* sheet: muncul dari bawah di HP, panel kanan di desktop */
.scrim{position:fixed;inset:0;background:rgba(30,10,18,.45);z-index:40}
.sheet{position:fixed;z-index:50;background:#fff;left:0;right:0;bottom:0;max-height:92dvh;border-radius:20px 20px 0 0;display:flex;flex-direction:column;box-shadow:0 -10px 40px rgba(0,0,0,.18);animation:up .2s ease-out}
.sheet.side{height:92dvh}
@keyframes up{from{transform:translateY(30px);opacity:0}}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line)}
.sheet-head h3{font-size:17px}
.x{border:0;background:#f4ecee;width:34px;height:34px;border-radius:50%;font-size:20px;line-height:1;flex-shrink:0}
.sheet-body{padding:16px;overflow-y:auto;flex:1;overscroll-behavior:contain}
.sheet-foot{padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff}

/* detail produk */
.pd{display:grid;gap:16px}
.pd img{border-radius:var(--r);aspect-ratio:1;object-fit:cover;width:100%;background:#f8eef1}
.pd h3{font-size:18px}
.pd .desc{white-space:pre-line;color:#4d3f44;font-size:14px}
.qty{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.qty button{border:0;background:#faf4f5;width:36px;height:36px;font-size:18px}
.qty span{min-width:36px;text-align:center;font-weight:700}

/* keranjang & checkout */
.ci{display:grid;grid-template-columns:64px 1fr auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}
.ci img{width:64px;height:64px;border-radius:10px;object-fit:cover;background:#f8eef1}
.ci .nm{font-size:13.5px;font-weight:600;line-height:1.3}
.ci .rm{border:0;background:none;color:var(--mut);font-size:12px;text-decoration:underline;padding:4px 0}
.sum{display:flex;justify-content:space-between;margin:4px 0}
.sum.total{font-size:17px;font-weight:800;margin-top:8px}
.field{display:block;margin-bottom:12px}
.field span{display:block;font-size:13px;font-weight:600;margin-bottom:4px}
.field input,.field textarea,.row input,.row select,.chat-in input{width:100%;border:1px solid #dccfd3;border-radius:10px;padding:11px 12px;background:#fff;outline:0;font-size:16px}
.field input:focus,.field textarea:focus,.row input:focus,.chat-in input:focus{border-color:var(--rose);box-shadow:0 0 0 3px #f9d5e1}
.sug{border:1px solid var(--line);border-radius:10px;margin-top:4px;max-height:190px;overflow:auto}
.sug button{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line);background:#fff;padding:10px 12px;font-size:14px}
.sug button:hover{background:var(--rose-l)}
.rate{display:flex;gap:10px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:8px;cursor:pointer}
.rate:has(input:checked){border-color:var(--rose);background:var(--rose-l)}
.rate b{margin-left:auto;white-space:nowrap}
.note{background:#fff8e6;border:1px solid #f3e1b0;color:#6b5210;border-radius:10px;padding:10px 12px;font-size:13.5px;margin:10px 0}
.note.err{background:#fff0f0;border-color:#f3c1c1;color:#8a1f1f}
.note.ok{background:#eefaf2;border-color:#bfe6cd;color:#17603a}
.row{display:flex;gap:8px;margin-bottom:10px}
.row select{width:auto}
.resi summary{cursor:pointer;color:var(--mut);margin:6px 0 10px;font-size:14px}

/* status & timeline */
.st{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;background:#f1e9eb}
.st.paid,.st.delivered{background:#e3f6ea;color:var(--ok)} .st.pending{background:#fff3d6;color:var(--warn)}
.st.processing,.st.shipped{background:#e5eefc;color:#1c4fa0} .st.cancelled,.st.expired,.st.refunded,.st.returned{background:#fde8e8;color:var(--bad)}
.tl{list-style:none;margin:12px 0 0;padding:0 0 0 14px;border-left:2px solid var(--line)}
.tl li{position:relative;padding:0 0 14px 12px;font-size:14px}
.tl li::before{content:"";position:absolute;left:-20px;top:5px;width:10px;height:10px;border-radius:50%;background:var(--rose)}
.tl small{display:block;color:var(--mut)}

/* chat AI */
.chat{display:flex;flex-direction:column;gap:8px;background:#fbf5f6}
.msg{max-width:84%;padding:9px 13px;border-radius:16px;white-space:pre-wrap;word-wrap:break-word;font-size:14.5px}
.msg.in{align-self:flex-end;background:var(--rose);color:#fff;border-bottom-right-radius:4px}
.msg.out{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px}
.msg.typing{color:var(--mut);font-style:italic}
.chat-in{display:flex;gap:8px;align-items:center}
.mic{cursor:pointer;border:0;background:var(--rose-l);color:var(--rose);width:44px;height:44px;border-radius:50%;flex-shrink:0;display:grid;place-items:center}
.call{display:flex;align-items:center;gap:10px;padding:10px 16px;background:#1f1418;color:#fff;font-size:14px}
.call .btn{margin-left:auto;min-height:34px;padding:6px 14px}
.pulse{width:10px;height:10px;border-radius:50%;background:#51cf66;animation:pulse 1.2s infinite}
@keyframes pulse{50%{opacity:.3;transform:scale(1.5)}}

.toast{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translateX(-50%);background:var(--ink);color:#fff;padding:10px 18px;border-radius:999px;z-index:70;font-weight:600;font-size:14px;max-width:90vw;text-align:center}

/* tablet */
@media (min-width:640px){
  .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
  .rail{grid-auto-columns:30%}
  .brand-txt{display:block}
  .hero{padding:40px 36px;margin-top:16px}.hero h1{font-size:34px}.hero-sub{font-size:15px;margin:10px 0 16px}.hero .btn.ghost{display:inline-flex}
}
/* laptop / desktop */
@media (min-width:1000px){
  body{padding-bottom:0}
  .tabbar{display:none}
  .top-in{height:68px;gap:20px}
  .top-nav .link{display:block}.cart-btn{display:grid}
  .search{max-width:520px}
  .hero{padding:56px 56px;margin-top:24px}.hero h1{font-size:42px}
  .grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:18px}
  .rail{grid-auto-flow:row;grid-template-columns:repeat(6,minmax(0,1fr));overflow:visible;margin:0;padding:0}
  .chips{flex-wrap:wrap;overflow:visible;margin:0;padding:0}
  .card .nm{font-size:14px}
  .sheet{left:auto;top:0;bottom:0;right:0;width:460px;max-height:none;height:100dvh;border-radius:0;animation:side .2s ease-out}
  .sheet.side{height:100dvh}
  #pSheet{left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);width:min(880px,92vw);height:auto;max-height:88vh;border-radius:20px;animation:none}
  .pd{grid-template-columns:1fr 1fr;align-items:start}
  .toast{bottom:28px}
}
@keyframes side{from{transform:translateX(40px);opacity:0}}
@media (min-width:1000px) and (max-width:1180px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
