/* ==========================================================================
   Halaman depan toko (/) — gaya khusus halaman publik.
   Dimuat SETELAH app.css (lewat $extraCss di views/landing.php) dan hanya di
   halaman ini: pengunjung yang cuma melihat etalase tidak ikut mengunduh gaya
   sidebar/kasir, dan gaya di sini tidak mungkin mengganggu halaman lain.

   Semua warna memakai token tema (--primary, --surface, ...) supaya warna
   pilihan pemilik di /kustomisasi langsung berlaku di halaman depan.
   ========================================================================== */

body.lp {
    background: var(--bg);
    overflow-x: hidden;
}
body.lp.has-bar { padding-bottom: 84px; }

/* ---------- Tombol yang hanya dipakai halaman depan ---------- */
.btn-block { width: 100%; justify-content: center; }
.btn-wa { background: #25d366; color: #04331a; border: 1px solid #25d366; font-weight: 700; }
.btn-wa:hover { background: #1fb457; color: #04331a; border-color: #1fb457; box-shadow: 0 8px 20px rgba(37, 211, 102, .28); }
.btn-ghost-w { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.btn-ghost-w:hover { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .5); }
/* Tombol Masuk di hero: sebesar tombol WhatsApp, di tengah, dan tetap terbaca
   di atas latar gelap hero. */
.btn-login {
    background: #fff; color: #1a1030; border: 1px solid #fff;
    font-weight: 700; min-width: 190px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}
.btn-login:hover { background: #f2eefb; color: #1a1030; border-color: #f2eefb; box-shadow: 0 12px 28px rgba(0, 0, 0, .28); }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.lp-hide-sm { display: inline; }

/* ---------- Kepala halaman ---------- */
.lp-top {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; gap: 14px;
    padding: 12px clamp(14px, 4vw, 40px);
    background: linear-gradient(180deg, rgba(8, 8, 14, .55), rgba(8, 8, 14, .18));
    backdrop-filter: saturate(150%) blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: background .2s, box-shadow .2s, border-color .2s;
}
.lp-top.is-stuck {
    background: var(--surface);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}
.lp-brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: #fff; }
.lp-brand:hover { color: #fff; }
.lp-brand .lg {
    width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; overflow: hidden;
    background: #fff; color: var(--primary-dark); font-weight: 800; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}
.lp-brand .lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-brand-txt { min-width: 0; display: block; }
.lp-brand-txt strong { display: block; font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-brand-txt small { display: block; font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .68); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.lp-nav a {
    color: rgba(255, 255, 255, .82); font-size: 13.5px; font-weight: 600;
    padding: 8px 13px; border-radius: 999px; transition: background .14s, color .14s;
}
.lp-nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.lp-top-act { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lp-nav + .lp-top-act { margin-left: 6px; }
/* setelah menempel: teks kepala berubah jadi gelap mengikuti permukaan */
.lp-top.is-stuck .lp-brand,
.lp-top.is-stuck .lp-brand:hover { color: var(--text); }
.lp-top.is-stuck .lp-brand-txt small { color: var(--text-muted); }
.lp-top.is-stuck .lp-nav a { color: var(--text-soft); }
.lp-top.is-stuck .lp-nav a:hover { background: var(--primary-light); color: var(--primary-dark); }
.lp-top.is-stuck .btn-ghost-w { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.lp-top.is-stuck .btn-ghost-w:hover { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary); }

/* ---------- Hero ---------- */
.lp-hero {
    position: relative; overflow: hidden;
    margin-top: calc(-1 * var(--header-h, 60px) - 20px);
    padding: calc(var(--header-h, 60px) + 54px) clamp(14px, 4vw, 40px) clamp(56px, 8vw, 92px);
    color: #fff;
    background:
        radial-gradient(900px 420px at 12% -10%, rgba(var(--glow), .55), transparent 62%),
        linear-gradient(155deg, var(--sidebar-1) 0%, var(--sidebar-2) 52%, var(--primary) 100%);
}
.lp-hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lp-hero-bg span {
    position: absolute; border-radius: 50%; filter: blur(46px); opacity: .5;
    background: rgba(var(--glow), .55);
}
.lp-hero-bg span:nth-child(1) { width: 340px; height: 340px; top: -90px; right: -60px; }
.lp-hero-bg span:nth-child(2) { width: 260px; height: 260px; bottom: -110px; left: -40px; background: rgba(255, 255, 255, .22); }
.lp-hero-bg span:nth-child(3) { width: 180px; height: 180px; top: 40%; right: 22%; background: rgba(var(--glow), .8); opacity: .32; }
.lp-hero-in {
    position: relative; z-index: 1;
    max-width: 1160px; margin: 0 auto;
    display: grid; grid-template-columns: minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px); align-items: center;
}
.lp-hero-txt { max-width: 840px; margin: 0 auto; text-align: center; }
.lp-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px; padding: 6px 15px; font-size: 12.5px; font-weight: 600;
    margin-bottom: 18px;
}
.lp-hero h1 {
    color: #fff; margin: 0 0 14px;
    font-size: clamp(30px, 4.6vw, 52px); font-weight: 800;
    letter-spacing: -.035em; line-height: 1.06;
}
.lp-sub {
    color: rgba(255, 255, 255, .86); font-size: clamp(14.5px, 1.5vw, 17px);
    line-height: 1.66; margin: 0 auto 26px; max-width: 620px;
}
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
/* Tombol WhatsApp, Masuk, dan Lihat Produk sama besar supaya sama-sama
   mudah dipencet (jempol di HP), bukan tombol kecil yang saling berdempet. */
.lp-cta .btn { min-width: 210px; justify-content: center; }
.lp-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 32px; justify-content: center; }
.lp-stat { display: flex; flex-direction: column; gap: 2px; }
.lp-stat strong { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.lp-stat span { font-size: 11.5px; color: rgba(255, 255, 255, .68); }

/* Kartu mengambang "Cara Pesan" sudah dihapus dari halaman depan;
   .lp-card-float/.lp-cf-head/.lp-steps tidak dipakai lagi. */

/* ---------- Bagian umum ---------- */
.lp-sec { max-width: 1160px; margin: 0 auto; padding: clamp(44px, 6vw, 68px) clamp(14px, 4vw, 40px) 0; scroll-margin-top: 84px; }
.lp-head { margin-bottom: 22px; max-width: 720px; }
.lp-head h2 { font-size: clamp(21px, 3vw, 29px); margin: 0 0 7px; letter-spacing: -.03em; }
.lp-head p { color: var(--text-muted); margin: 0; font-size: 14px; line-height: 1.6; }

.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 16px; }
.lp-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    padding: 22px; box-shadow: var(--shadow-xs);
    transition: transform .16s, box-shadow .16s, border-color .16s;
}
.lp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.lp-card .ic {
    width: 46px; height: 46px; border-radius: 14px; margin-bottom: 14px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); background: var(--primary-light);
}
.lp-card h3 { margin: 0 0 7px; font-size: 16px; letter-spacing: -.01em; }
.lp-card p { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.62; }

/* ---------- Promo ---------- */
.lp-promo { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 15px; }
.lp-pcard {
    position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    padding: 20px; box-shadow: var(--shadow-xs);
    background-image: linear-gradient(160deg, var(--primary-light), transparent 62%);
}
.lp-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary); color: var(--on-primary);
    border-radius: 999px; padding: 4px 11px; font-size: 11px; font-weight: 700;
    margin-bottom: 12px;
}
.lp-pnm { font-weight: 700; font-size: 15px; line-height: 1.35; }
.lp-pr { color: var(--primary); font-weight: 800; font-size: 19px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.lp-pr span { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.lp-pinfo { font-size: 12.5px; color: var(--text-soft); margin-top: 9px; font-weight: 600; }
.lp-pend { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }

/* ---------- Pencarian & katalog ---------- */
.lp-cari {
    position: relative; display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    padding: 13px 16px; box-shadow: var(--shadow-xs); margin-bottom: 18px;
    color: var(--text-muted);
}
.lp-cari:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.lp-cari input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    font: inherit; font-size: 14.5px; color: var(--text);
}
.lp-cari-x {
    border: 0; background: var(--surface-2); color: var(--text-muted);
    border-radius: 999px; width: 28px; height: 28px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.lp-cari-x:hover { background: var(--primary-light); color: var(--primary-dark); }

.lp-prod { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.lp-pitem {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
    padding: 15px; box-shadow: var(--shadow-xs); min-width: 0;
    transition: transform .14s, box-shadow .14s, border-color .14s;
}
.lp-pitem:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.lp-pitem.is-hidden { display: none; }
.lp-pitem.is-picked { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.lp-thumb {
    height: 76px; border-radius: 13px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(150deg, var(--primary-light), var(--surface-2));
    color: var(--primary-dark); font-size: 27px; font-weight: 800; letter-spacing: -.04em;
}
.lp-nm { font-weight: 600; font-size: 13.5px; line-height: 1.36; min-height: 37px; word-break: break-word; }
.lp-hrg { color: var(--primary); font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lp-hrg span { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.lp-stok { font-size: 11.5px; color: var(--text-muted); }
.lp-pitem .lp-add { margin-top: auto; }
.lp-pitem.is-picked .lp-add { background: var(--success); border-color: var(--success); }

.lp-empty { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.lp-empty .ic { color: var(--primary); display: flex; justify-content: center; margin-bottom: 10px; }
.lp-empty h3 { margin: 0 0 6px; color: var(--text); }
.lp-empty p { margin: 0 0 16px; font-size: 13.5px; }

/* ---------- Tentang, jam buka, lokasi ---------- */
.lp-about {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    padding: 22px; box-shadow: var(--shadow-xs);
    color: var(--text-soft); font-size: 14px; line-height: 1.75;
}
.lp-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 16px; }
.lp-panel {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    padding: 22px; box-shadow: var(--shadow-xs);
}
.lp-panel-head { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; margin-bottom: 13px; color: var(--text); }
.lp-jam { color: var(--text-soft); font-size: 14px; line-height: 1.8; font-variant-numeric: tabular-nums; }
.lp-alamat { color: var(--text-soft); font-size: 14px; line-height: 1.7; margin-bottom: 15px; }

/* ---------- Kontak ---------- */
.lp-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 15px; }
.lp-cc {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    padding: 24px 20px; box-shadow: var(--shadow-xs); color: inherit;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
a.lp-cc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); color: inherit; }
.lp-cc .ic {
    width: 48px; height: 48px; border-radius: 15px; margin-bottom: 9px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light); color: var(--primary-dark);
}
.lp-cc .ic-wa { background: #dff9e8; color: #0b7a3d; }
.lp-cc .lbl { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.lp-cc .val { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; word-break: break-word; }
.lp-cc .go { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; }
.lp-cc-static { opacity: .92; }

/* ---------- Footer ---------- */
.lp-foot { margin-top: clamp(48px, 6vw, 72px); background: var(--sidebar-1); color: rgba(255, 255, 255, .68); }
.lp-foot-in {
    max-width: 1160px; margin: 0 auto; padding: 30px clamp(14px, 4vw, 40px);
    display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: space-between;
    font-size: 12.5px;
}
.lp-foot strong { color: #fff; font-size: 14.5px; }
.lp-foot-sub { font-size: 11.5px; color: rgba(255, 255, 255, .55); margin-top: 3px; }
.lp-foot-txt { max-width: 420px; line-height: 1.6; }
.lp-foot-cr { font-variant-numeric: tabular-nums; }

/* ---------- Bar pesanan + panel pesanan ---------- */
.lp-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: flex; align-items: center; gap: 12px; justify-content: space-between;
    padding: 11px clamp(14px, 4vw, 40px);
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -10px 30px rgba(15, 23, 41, .12);
}
.lp-bar[hidden] { display: none; }
.lp-bar-info { display: flex; flex-direction: column; min-width: 0; }
.lp-bar-info strong { font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lp-bar-info span { font-size: 11.5px; color: var(--text-muted); }

.lp-drawer { position: fixed; inset: 0; z-index: 80; }
.lp-drawer[hidden] { display: none; }
.lp-drawer-bg { position: absolute; inset: 0; background: rgba(8, 10, 18, .55); backdrop-filter: blur(2px); }
.lp-drawer-in {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(94vw, 420px); display: flex; flex-direction: column;
    background: var(--surface); border-left: 1px solid var(--border);
    box-shadow: -20px 0 60px rgba(0, 0, 0, .3);
    animation: lp-slide .22s ease;
}
@keyframes lp-slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.lp-drawer-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.lp-drawer-head strong { font-size: 15.5px; display: block; }
.lp-drawer-head small { font-size: 11.5px; color: var(--text-muted); }
.lp-x {
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted);
    width: 34px; height: 34px; border-radius: 11px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lp-x:hover { border-color: var(--primary); color: var(--primary); }
.lp-drawer-list { flex: 1; overflow-y: auto; padding: 6px 18px; }
.lp-drawer-empty { padding: 34px 18px; text-align: center; color: var(--text-muted); font-size: 13px; }
.lp-drawer-empty svg { color: var(--primary); }
.lp-drawer-empty p { margin: 10px 0 0; }
.lp-item { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.lp-item:last-child { border-bottom: 0; }
.lp-item-txt { flex: 1; min-width: 0; }
.lp-item-nm { font-weight: 600; font-size: 13.5px; line-height: 1.35; word-break: break-word; }
.lp-item-hrg { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.lp-item-sub { font-size: 13px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; margin-top: 4px; }
.lp-qty { display: flex; align-items: center; gap: 4px; }
.lp-q {
    width: 30px; height: 30px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
    font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.lp-q:hover { border-color: var(--primary); color: var(--primary); }
.lp-q:disabled { opacity: .45; cursor: not-allowed; }
.lp-qn { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp-rm { border: 0; background: none; color: var(--danger); cursor: pointer; padding: 6px; border-radius: 8px; }
.lp-rm:hover { background: var(--danger-bg); }
.lp-drawer-foot { padding: 14px 18px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.lp-note-lbl { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.lp-drawer-foot textarea {
    width: 100%; resize: vertical; font: inherit; font-size: 13.5px; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
}
.lp-drawer-foot textarea:focus { outline: 0; border-color: var(--primary); box-shadow: var(--ring); }
.lp-total { display: flex; align-items: center; justify-content: space-between; margin: 13px 0 6px; font-size: 14px; }
.lp-total strong { font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lp-drawer-note { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; margin-bottom: 12px; }
.lp-warn { color: var(--warning-text); background: var(--warning-bg); border-radius: 10px; padding: 9px 11px; }
.lp-drawer-act { display: flex; gap: 9px; }
.lp-drawer-act .btn { flex: 1; justify-content: center; }
.lp-drawer-act .btn:first-child { flex: 0 0 auto; }

/* ---------- Tombol WhatsApp mengambang ---------- */
.lp-fab {
    position: fixed; right: 18px; bottom: 18px; z-index: 65;
    width: 54px; height: 54px; border-radius: 50%;
    background: #25d366; color: #04331a;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 28px rgba(37, 211, 102, .42);
    transition: transform .15s, box-shadow .15s;
}
.lp-fab:hover { transform: translateY(-2px) scale(1.03); color: #04331a; box-shadow: 0 16px 34px rgba(37, 211, 102, .5); }
body.lp.has-bar .lp-fab { bottom: 84px; }

/* ---------- Mode gelap: bagian bawah hero tetap terang ---------- */
html[data-mode="dark"] .lp-hero { background: linear-gradient(155deg, #08080e 0%, var(--sidebar-2) 58%, var(--primary) 100%); }
html[data-mode="dark"] .lp-cc .ic-wa { background: rgba(37, 211, 102, .16); color: #6ee7a4; }
html[data-mode="dark"] .lp-thumb { background: linear-gradient(150deg, rgba(var(--glow), .22), var(--surface-2)); color: #fff; }
html[data-mode="dark"] .lp-top:not(.is-stuck) .btn-wa { background: #25d366; }

/* ---------- Layar menengah & HP ---------- */
@media (max-width: 1024px) {
    .lp-nav { display: none; }
}
@media (max-width: 760px) {
    .lp-hide-sm { display: none; }
    .lp-hero { margin-top: calc(-1 * var(--header-h, 60px) - 18px); padding-top: calc(var(--header-h, 60px) + 34px); }
    .lp-stats { gap: 18px; margin-top: 26px; }
    .lp-stat strong { font-size: 16px; }
    .lp-cta { flex-direction: column; }
    .lp-cta .btn { width: 100%; justify-content: center; }
    .lp-sec { scroll-margin-top: 72px; }
    .lp-foot-in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
    .lp-prod { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 11px; }
    .lp-pitem { padding: 13px; }
    .lp-thumb { height: 64px; font-size: 23px; }
    .lp-nm { font-size: 13px; min-height: 34px; }
    .lp-drawer-act { flex-direction: column; }
    .lp-drawer-act .btn:first-child { width: 100%; }
    .lp-fab { width: 50px; height: 50px; right: 14px; bottom: 14px; }
    body.lp.has-bar .lp-fab { bottom: 80px; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-drawer-in { animation: none; }
    .lp-card, .lp-pitem, .lp-cc, .lp-fab { transition: none; }
}
