/* =========================================================
   RESET & BASE
========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --teal: #991B1B;
    --teal-dk: #7F1D1D;
    --teal-lt: #FEF2F2;
    --teal-xlt: #FFF5F5;
    --text: #111827;
    --text-2: #374151;
    --muted: #6B7280;
    --muted-2: #9CA3AF;
    --bg: #FFFFFF;
    --bg-soft: #F8FAFB;
    --border: rgba(0, 0, 0, 0.06);
    --gold: #F59E0B;
    --red: #EF4444;
    --r: 20px;
}

html {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-soft);
    color: var(--text);
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

svg {
    display: block;
    flex-shrink: 0;
}

/* =========================================================
   STAGE UTILITY
========================================================= */
.stage {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* =========================================================
   ── PHASE 0: CATALOG / MARKETPLACE ──
========================================================= */
#catalog-page {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: #F2F4F7;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

#catalog-page::-webkit-scrollbar {
    display: none;
}

/* NAV */
.cat-nav {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    padding: 0 16px 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.cat-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.cat-logo {
    font-size: 17px;
    font-weight: 800;
    color: #1E293B;
    letter-spacing: -0.5px;
}

.cat-logo em {
    color: #991B1B;
    font-style: normal;
}

.cat-nav-right {
    display: flex;
    gap: 2px;
    align-items: center;
}

.cat-cart-btn {
    position: relative;
}

.cat-cart-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 14px;
    height: 14px;
    background: #991B1B;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cat-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F2F4F7;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: text;
}

.cat-search-placeholder {
    font-size: 13px;
    color: #94A3B8;
    font-family: inherit;
}

/* BODY */
.cat-body {
    padding: 16px 0 0;
}

.cat-bottom-pad {
    height: 36px;
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.cat-footer {
    background: #0F172A;
    color: #94A3B8;
}

.cat-footer-inner {
    padding: 36px 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
}

/* ── Brand ── */
.cat-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cat-footer-logo {
    font-size: 22px;
    font-weight: 800;
    color: #F1F5F9;
    letter-spacing: -0.5px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cat-footer-logo em {
    color: var(--teal);
    font-style: normal;
}

.cat-footer-tagline {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.cat-footer-socials {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.cat-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.cat-social-btn:hover {
    background: var(--teal);
    color: #fff;
}

/* ── Link Columns ── */
.cat-footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.cat-footer-col {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 100px;
}

.cat-footer-col-title {
    font-size: 11px;
    font-weight: 700;
    color: #CBD5E1;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 2px;
}

.cat-footer-link {
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    transition: color 0.15s;
    cursor: pointer;
}

.cat-footer-link:hover {
    color: #94A3B8;
}

/* ── Trust Badges ── */
.cat-footer-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.cat-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: #64748B;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 5px 12px;
}

/* ── Bottom Bar ── */
.cat-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 20px;
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.cat-footer-copy {
    font-size: 12px;
    color: #334155;
    margin: 0;
    text-align: center;
}

.cat-footer-copy strong {
    color: #475569;
}

.cat-footer-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.cat-pay-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #475569;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.03);
}

/* ── Desktop: 2-column footer ── */
@media (min-width: 640px) {
    .cat-footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        padding: 40px 32px 32px;
    }

    .cat-footer-brand {
        max-width: 200px;
    }

    .cat-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        padding: 16px 32px 24px;
    }

    .cat-footer-trust {
        padding: 18px 32px;
    }
}

/* CATEGORY PILLS */
.cat-pills-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 16px;
    margin-bottom: 18px;
}

.cat-pills-scroll::-webkit-scrollbar {
    display: none;
}

.cat-pills {
    display: flex;
    gap: 8px;
    width: max-content;
}

.cat-pill {
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: 1.5px solid #E2E8F0;
    background: #fff;
    color: #64748B;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.cat-pill.active {
    background: #991B1B;
    border-color: #991B1B;
    color: #fff;
}

/* PROMO BANNER */
.cat-banner {
    margin: 0 16px 20px;
    background: linear-gradient(135deg, #991B1B 0%, #7F1D1D 100%);
    border-radius: 18px;
    padding: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.cat-banner::after {
    content: '';
    position: absolute;
    right: 64px;
    top: -24px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}

.cat-banner-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.cat-banner-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin: 0 0 4px;
}

.cat-banner-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
}

.cat-banner-emoji {
    font-size: 52px;
    line-height: 1;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.18));
    position: relative;
    z-index: 1;
}

/* SECTION HEADER */
.cat-section-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    margin-bottom: 14px;
}

.cat-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1E293B;
}

.cat-lihat-semua {
    font-size: 12px;
    font-weight: 600;
    color: #991B1B;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

/* PRODUCT GRID */
.cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
}

/* PRODUCT CARD */
.cat-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    transition: transform 0.15s;
}

.cat-card:active {
    transform: scale(0.97);
}

.cat-card-special {
    outline: 1.5px solid rgba(153, 27, 27, 0.25);
    box-shadow: 0 2px 14px rgba(153, 27, 27, 0.15);
}

.cat-card-img {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Gambar produk — cover agar memenuhi seluruh area kartu */
.cat-card-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.cat-card-emoji {
    font-size: 46px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.cat-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 6px;
    letter-spacing: 0.2px;
}

.badge-hot {
    background: #EF4444;
    color: #fff;
}

.badge-new {
    background: #8B5CF6;
    color: #fff;
}

.badge-purple {
    background: #7C3AED;
    color: #fff;
}

.badge-teal {
    background: #991B1B;
    color: #fff;
}

.cat-card-info {
    padding: 10px 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cat-store {
    font-size: 10px;
    font-weight: 700;
    color: #991B1B;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cat-name {
    font-size: 13px;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 2px 0;
}

.cat-stars {
    font-size: 10px;
    color: #F59E0B;
}

.cat-sold {
    font-size: 10px;
    color: #94A3B8;
}

.cat-price-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.cat-price {
    font-size: 14px;
    font-weight: 800;
    color: #1E293B;
}

.cat-price-orig {
    font-size: 11px;
    color: #94A3B8;
    text-decoration: line-through;
}

.cat-disc {
    display: inline-block;
    background: #FEF2F2;
    color: #EF4444;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 2px;
}

.cat-btn-beli {
    width: 100%;
    padding: 9px 0;
    background: #991B1B;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-top: 2px;
}

.cat-btn-beli:active {
    transform: scale(0.96);
    background: #7F1D1D;
}

.cat-btn-beli:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ── Countdown Timer ── */
.cat-countdown {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
}

.cat-cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 7px;
    padding: 4px 8px;
    min-width: 34px;
    backdrop-filter: blur(4px);
}

.cat-cd-unit b {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.cat-cd-unit small {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cat-cd-sep {
    font-size: 18px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1;
    margin-bottom: 10px;
}

/* ── Cart Badge Bump ── */
@keyframes cat-badge-bump {

    0%,
    100% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.6);
    }

    70% {
        transform: scale(0.88);
    }
}

.cat-cart-badge.bump {
    animation: cat-badge-bump 0.38s cubic-bezier(.36, .07, .19, .97);
}

/* ── Search Bar Focus ── */
.cat-search-bar {
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.cat-search-bar.focused {
    background: #fff;
    box-shadow: 0 0 0 2px #991B1B;
}

/* ── Toast ── */
#cat-toast {
    position: fixed;
    bottom: 74px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #1E293B;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 11px 22px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

#cat-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Search Input ── */
.cat-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1E293B;
    min-width: 0;
    caret-color: #991B1B;
}

.cat-search-input::placeholder {
    color: #94A3B8;
}

.cat-search-input::-webkit-search-cancel-button {
    cursor: pointer;
}

.cat-search-bar:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px #991B1B;
}

/* ── Empty State ── */
.cat-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    gap: 10px;
}

.cat-empty[hidden] {
    display: none;
}

.cat-empty-ico {
    font-size: 38px;
}

.cat-empty p {
    font-size: 14px;
    font-weight: 600;
    color: #94A3B8;
    margin: 0;
    text-align: center;
    line-height: 1.6;
}

.cat-bottom-pad {
    height: 24px;
}

/* ── Catalog Responsive ── */

/* Very small phones */
@media (max-width: 360px) {
    .cat-nav-inner {
        height: 46px;
    }

    .cat-banner-title {
        font-size: 15px;
    }

    .cat-banner-emoji {
        font-size: 38px;
    }

    .cat-card-emoji {
        font-size: 36px;
    }

    .cat-card-info {
        padding: 8px 9px 10px;
    }

    .cat-price {
        font-size: 13px;
    }

    .cat-name {
        font-size: 12px;
    }
}

/* Large phones — 3 columns */
@media (min-width: 480px) {
    .cat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .cat-banner-title {
        font-size: 20px;
    }

    .cat-banner-emoji {
        font-size: 58px;
    }
}

/* Tablets — 4 columns, centred layout */
@media (min-width: 700px) {
    #catalog-page {
        background: #E8EAED;
    }

    .cat-nav,
    .cat-body {
        max-width: 960px;
        margin-left: auto;
        margin-right: auto;
    }

    .cat-nav {
        border-radius: 0 0 16px 16px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.09);
    }

    .cat-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .cat-banner {
        margin: 0 0 20px;
    }

    .cat-grid,
    .cat-pills-scroll,
    .cat-section-hd {
        padding-left: 0;
        padding-right: 0;
    }

    .cat-pills-scroll {
        padding: 0;
    }
}

/* Desktop — wider, 5 columns */
@media (min-width: 1100px) {

    .cat-nav,
    .cat-body {
        max-width: 1280px;
    }

    .cat-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }

    .cat-card-img {
        aspect-ratio: 4/3;
    }

    .cat-banner-title {
        font-size: 22px;
    }

    .cat-banner-emoji {
        font-size: 68px;
    }

    .cat-banner {
        padding: 26px 32px;
    }
}

/* ── Shop Page: Desktop 2-Column Layout ── */
.shop-body {
    display: block;
    /* mobile: single column */
}

@media (min-width: 768px) {
    #shop-page {
        overflow-x: hidden;
    }

    .shop-nav {
        padding-left: max(24px, calc((100vw - 1200px) / 2));
        padding-right: max(24px, calc((100vw - 1200px) / 2));
    }

    .shop-body {
        display: flex;
        align-items: flex-start;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }

    .product-hero {
        position: sticky;
        top: 65px;
        width: min(420px, 42%);
        flex-shrink: 0;
        height: calc(100dvh - 65px - 86px);
        margin: 0;
        border-radius: 0 0 24px 0;
    }

    .product-info {
        flex: 1;
        min-width: 0;
        padding: 28px 44px 130px;
    }

    .bottom-bar {
        padding-left: max(24px, calc((100vw - 1200px) / 2));
        padding-right: max(24px, calc((100vw - 1200px) / 2));
    }
}

/* =========================================================
   ── PHASE 1: SHOP PAGE ──
========================================================= */
#shop-page {
    position: fixed;
    inset: 0;
    background: var(--bg);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 20;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#shop-page::-webkit-scrollbar {
    display: none;
}

/* Nav */
.shop-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
}

.nav-logo em {
    font-style: normal;
    color: var(--teal);
}

.nav-right {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 38px;
    height: 38px;
    background: var(--bg-soft);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    transition: background 0.15s, color 0.15s;
    position: relative;
}

.icon-btn:hover {
    background: var(--teal-lt);
    color: var(--teal);
}

.cart-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    background: var(--teal);
    border-radius: 50%;
    border: 1.5px solid var(--bg);
    animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(153, 27, 27, 0.45);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(153, 27, 27, 0);
    }
}

/* Hero */
.product-hero {
    margin: 12px 16px;
    height: 285px;
    border-radius: var(--r);
    background: linear-gradient(145deg, var(--teal-lt) 0%, #FCA5A5 55%, #DC2626 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    animation: blob 9s ease-in-out infinite;
}

.hero-blob-a {
    width: 200px;
    height: 200px;
    top: -70px;
    right: -60px;
    animation-delay: 0s;
}

.hero-blob-b {
    width: 130px;
    height: 130px;
    bottom: -40px;
    left: -30px;
    animation-delay: -4s;
    animation-direction: reverse;
}

@keyframes blob {

    0%,
    100% {
        border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%;
    }

    33% {
        border-radius: 33% 67% 57% 43% / 68% 33% 67% 32%;
    }

    66% {
        border-radius: 52% 48% 27% 73% / 37% 70% 30% 63%;
    }
}

.hero-icon {
    font-size: 90px;
    z-index: 1;
    filter: drop-shadow(0 18px 36px rgba(153, 27, 27, 0.28));
    animation: float 3.2s ease-in-out infinite;
    line-height: 1;
}

.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-16px) rotate(3deg);
    }
}

.hero-stock-pill {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: var(--bg);
    border-radius: 10px;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10B981;
    animation: pulse-dot 2s ease-in-out infinite;
}

.hero-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.hdot {
    width: 5px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
}

.hdot.on {
    width: 16px;
    background: white;
}

/* Product info */
.product-info {
    padding: 20px 20px 0 20px;
}

.tags-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 100px;
}

.tag-hot {
    background: #FEE2E2;
    color: #B91C1C;
}

.tag-off {
    background: #FEF3C7;
    color: #B45309;
}

.tag-spc {
    background: var(--teal-lt);
    color: var(--teal-dk);
}

.product-name {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.product-tagline {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 16px;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.stars {
    color: var(--gold);
    font-size: 13px;
    letter-spacing: -1px;
}

.rating-val {
    font-size: 13px;
    font-weight: 700;
}

.rating-cnt {
    font-size: 12px;
    color: var(--muted);
}

.sep {
    width: 3px;
    height: 3px;
    background: var(--muted-2);
    border-radius: 50%;
}

.sold-txt {
    font-size: 12px;
    color: var(--muted);
}

.price-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-main {
    font-size: 27px;
    font-weight: 800;
    color: var(--teal);
    letter-spacing: -1px;
}

.price-orig {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
    margin-top: 2px;
}

.disc-pill {
    background: linear-gradient(135deg, #FECDD3, #FCA5A5);
    color: #B91C1C;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 12px;
    border-radius: 10px;
}

/* ── Shipping Row ── */
.ship-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F0FDF9;
    border: 1px solid #A7F3D0;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

.ship-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #047857;
    flex-shrink: 0;
}

.ship-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ship-main {
    font-size: 13px;
    font-weight: 700;
    color: #065F46;
}

.ship-sub {
    font-size: 11px;
    color: #047857;
}

/* ── Seller Verified Badge ── */
.seller-verified {
    display: inline-block;
    background: linear-gradient(135deg, var(--teal), var(--teal-dk));
    color: #fff !important;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    letter-spacing: 0.3px;
    vertical-align: middle;
    margin-left: 4px;
}

/* ── Chat Button ── */
.btn-chat {
    width: 50px;
    height: 50px;
    background: var(--teal-lt);
    border: 1.5px solid rgba(153, 27, 27, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    flex-shrink: 0;
    transition: all 0.2s;
}

.btn-chat:active {
    background: var(--teal);
    color: #fff;
}

.feat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 22px;
}

.feat-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feat-icon {
    width: 34px;
    height: 34px;
    background: var(--teal-lt);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    flex-shrink: 0;
}

.feat-text strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.feat-text span {
    font-size: 11px;
    color: var(--muted);
}

.sec-label {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.desc {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.seller-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 160px;
}

.seller-ava {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dk));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.seller-info strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.seller-info span {
    font-size: 11px;
    color: var(--muted);
}

.btn-follow {
    margin-left: auto;
    padding: 6px 14px;
    border: 1.5px solid var(--teal);
    border-radius: 8px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-follow:hover {
    background: var(--teal);
    color: white;
}

/* Bottom Bar */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 20px 32px;
    background: linear-gradient(to top, #fff 72%, transparent);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.btn-wish {
    width: 50px;
    height: 50px;
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    flex-shrink: 0;
    transition: all 0.2s;
}

.btn-wish:hover {
    border-color: #EC4899;
    color: #EC4899;
    background: #FDF2F8;
}

#btn-order {
    flex: 1;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dk) 100%);
    color: white;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    box-shadow: 0 8px 24px rgba(153, 27, 27, 0.34);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

#btn-order::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.13) 0%, transparent 60%);
    pointer-events: none;
}

#btn-order:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(153, 27, 27, 0.42);
}

#btn-order:active:not(:disabled) {
    transform: translateY(0);
}

#btn-order:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   ── PHASE 2: DELIVERY STAGE ──
========================================================= */
#delivery-stage {
    background: var(--bg-soft);
    justify-content: flex-start;
    z-index: 15;
    display: none;
}

.dl-top {
    width: 100%;
    padding: 52px 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.dl-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Steps track */
.steps-track {
    width: 100%;
    max-width: 290px;
    display: flex;
    align-items: flex-start;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #E5E7EB;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted-2);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-item.active .step-circle {
    border-color: var(--teal);
    background: var(--teal);
    color: white;
    box-shadow: 0 0 0 5px rgba(153, 27, 27, 0.18);
    transform: scale(1.1);
}

.step-item.done .step-circle {
    border-color: var(--teal);
    background: var(--teal-lt);
    color: var(--teal);
}

.step-lbl {
    font-size: 9px;
    font-weight: 600;
    color: var(--muted-2);
    text-align: center;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.step-item.active .step-lbl {
    color: var(--teal);
}

.step-conn {
    flex: 1;
    height: 2px;
    background: #E5E7EB;
    margin-top: 14px;
    border-radius: 2px;
    overflow: hidden;
    transition: background 0.4s;
}

.step-conn.done {
    background: var(--teal);
}

.step-conn.filling::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background: var(--teal);
    animation: fill-progress 0.5s ease forwards;
}

@keyframes fill-progress {
    to {
        width: 100%;
    }
}

/* Lottie area */
.dl-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 24px 40px;
    gap: 18px;
    width: 100%;
}

#lottie-delivery {
    width: min(275px, 72vw);
    height: min(275px, 72vw);
}

.dl-texts {
    text-align: center;
}

.dl-caption {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 5px;
}

.dl-sub {
    font-size: 13px;
    color: var(--muted);
}

/* ── Button: Pesanan Diterima ── */
#btn-terima {
    display: none;
    margin-top: 24px;
    padding: 15px 36px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dk));
    color: white;
    border: none;
    border-radius: 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(153, 27, 27, 0.42);
}

/* Glass sheen */
#btn-terima::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 55%);
    pointer-events: none;
}

/* Shimmer sweep */
#btn-terima::after {
    content: '';
    position: absolute;
    top: 0;
    left: -70%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
    animation: terima-shimmer 1.9s ease-in-out infinite;
    pointer-events: none;
}

@keyframes terima-shimmer {
    0% {
        left: -70%;
    }

    100% {
        left: 120%;
    }
}

/* Pulse ring mengelilingi button */
.terima-ring {
    position: absolute;
    inset: -5px;
    border-radius: 21px;
    border: 2.5px solid rgba(153, 27, 27, 0.65);
    animation: terima-ring-pulse 1.6s ease-out infinite;
    pointer-events: none;
}

@keyframes terima-ring-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    80% {
        transform: scale(1.12);
        opacity: 0;
    }

    100% {
        transform: scale(1.12);
        opacity: 0;
    }
}

/* =========================================================
   ── PHASE 3: GIFT STAGE ──
========================================================= */
#gift-stage {
    background: var(--bg-soft);
    display: none;
    z-index: 15;
}

#gift-stage .inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

#lottie-box {
    width: min(280px, 74vw);
    height: min(280px, 74vw);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    will-change: transform;
}

.tap-hint {
    font-size: 13px;
    font-weight: 600;
    color: var(--teal);
    display: flex;
    align-items: center;
    gap: 7px;
    animation: hint-pulse 1.9s ease-in-out infinite;
}

@keyframes hint-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(0.96);
    }
}

/* =========================================================
   ── POLAROID BACKGROUND ──
========================================================= */
#polaroid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.polaroid {
    position: fixed;
    width: min(112px, 28vw);
    background: #FFFDF5;
    padding: 7px 7px 26px;
    border-radius: 3px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13), 0 1px 4px rgba(0, 0, 0, 0.07);
    opacity: 0;
    will-change: transform, opacity, left, top;
}

.polaroid-photo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(22px, 6vw, 30px);
    position: relative;
    overflow: hidden;
}

.polaroid-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
}

.polaroid-emoji {
    position: relative;
    z-index: 1;
}

.polaroid-lbl {
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    margin-top: 6px;
    color: var(--muted);
    letter-spacing: 0.3px;
}

/* =========================================================
   ── CELEBRATION STAGE ──
========================================================= */
#celebration-stage {
    background: radial-gradient(ellipse 58% 55% at 50% 50%,
            rgba(248, 250, 251, 0.78) 0%, transparent 100%);
    display: none;
    z-index: 10;
    height: 100dvh;
    width: 100dvw;
    justify-content: center;
    align-items: center;
    /* overflow diatur lewat JS: visible saat peek, default saat normal */
}

/* Mode peek: stage transparan, hanya envelope yang bisa diklik */
#celebration-stage.envelope-peek {
    background: transparent;
    pointer-events: none;
}

#celebration-stage.envelope-peek #lottie-envelope {
    pointer-events: auto;
    filter: drop-shadow(0 -10px 24px rgba(153, 27, 27, 0.32));
}

/* ── Peek message (muncul saat envelope mengintip di bawah) ── */
.peek-message {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 0 36px;
    opacity: 0;
    transform: translateY(calc(-50% - 14px));
    transition: opacity 0.5s ease 0.25s, transform 0.5s ease 0.25s;
    pointer-events: none;
    z-index: 2;
}

#celebration-stage.envelope-peek .peek-message {
    opacity: 1;
    transform: translateY(-50%);
}

.peek-msg-eyebrow {
    font-size: 11px;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.peek-msg-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 9vw, 46px);
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.2;
    margin: 0;
}

.peek-msg-body {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.8;
    margin: 0;
}

#celebration-stage .inner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 11;
}

#lottie-envelope {
    width: min(265px, 70vw);
    height: min(265px, 70vw);
    cursor: pointer;
    filter: drop-shadow(0 10px 28px rgba(153, 27, 27, 0.2));
    will-change: transform;
    -webkit-user-select: none;
    user-select: none;
}

.env-hint {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: -0.2px;
}

/* =========================================================
/* ── PHASE 4: SWIPER FLASHCARD OVERLAY ──
========================================================= */
#swiper-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 200;
    display: none;
    /* JS sets to flex */
    align-items: center;
    justify-content: center;
}

/* Swiper wrapper — dimensi fixed wajib untuk effect: 'cards' */
#card-deck-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

#card-swiper {
    width: min(320px, 88vw);
    height: min(480px, 80dvh);
    overflow: visible !important;
    /* tumpukan kartu belakang harus terlihat */
}

/* ── Slide shell — harus mengisi penuh dimensi Swiper ── */
.swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* ── Card Base ── */
.card {
    background: #FCFBF8;
    border-radius: 16px;
    padding: 44px 26px 28px;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.05),
        0 10px 28px rgba(0, 0, 0, 0.09),
        0 24px 48px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    text-align: center;
}

.card::-webkit-scrollbar {
    display: none;
}

/* ── Animated rainbow top stripe ── */
.card-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--teal), #FFD700, #FF6B9D, #A78BFA, var(--teal));
    background-size: 260% 100%;
    animation: card-stripe-move 3s linear infinite;
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}

@keyframes card-stripe-move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 260% 0;
    }
}

/* ── Greeting Card: inset decorative gold border ── */
.card-greeting {
    justify-content: center;
    /* pusatkan konten di sumbu Y */
    outline: 1px solid rgba(190, 155, 80, 0.26);
    outline-offset: -10px;
}

/* Nonaktifkan flex-grow pada body agar justify-content: center bekerja */
.card-greeting .card-body {
    flex: none;
}

/* ── Voucher Card: ticket-style with side notch cutouts ── */
.card-voucher {
    overflow: visible;
    box-shadow: none;
    /* shadow delegated to parent via filter */
    /* Half-circle notch cutout at 75% from top on both sides */
    --notch-r: 14px;
    --sep-y: 75%;
    mask-image:
        radial-gradient(circle var(--notch-r) at 0% var(--sep-y), transparent 99%, #fff 100%),
        radial-gradient(circle var(--notch-r) at 100% var(--sep-y), transparent 99%, #fff 100%);
    -webkit-mask-image:
        radial-gradient(circle var(--notch-r) at 0% var(--sep-y), transparent 99%, #fff 100%),
        radial-gradient(circle var(--notch-r) at 100% var(--sep-y), transparent 99%, #fff 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

/* Layered drop-shadow on slide parent — follows the masked shape ✓ */
.swiper-slide:has(.card-voucher) {
    filter:
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08)) drop-shadow(0 8px 22px rgba(0, 0, 0, 0.10)) drop-shadow(0 20px 40px rgba(0, 0, 0, 0.07));
}

/* ── Voucher badge ── */
.voucher-tag {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--teal);
    background: var(--teal-lt);
    padding: 5px 14px;
    border-radius: 100px;
    margin-top: 8px;
    flex-shrink: 0;
}

/* ── Dashed teal separator (aligns with notch position) ── */
.voucher-sep {
    align-self: stretch;
    border: none;
    border-top: 1.5px dashed rgba(153, 27, 27, 0.55);
    margin: 4px 0;
    flex-shrink: 0;
}

/* ── Typography ── */
.card-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: clamp(17px, 4.8vw, 21px);
    font-weight: 700;
    line-height: 1.28;
    color: var(--text);
    letter-spacing: 0.1px;
    margin-top: 4px;
}

.card-body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13.5px;
    color: var(--text-2);
    line-height: 1.75;
    flex: 1;
    /* push buttons toward bottom of card */
}

/* ── Voucher S&K fine-print line ── */
.text-snk {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-style: italic;
    color: #6B7280;
    line-height: 1.6;
    margin-top: 8px;
}

.snk-label {
    display: block;
    font-style: normal;
    font-weight: 700;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--teal);
    margin-bottom: 0;
}

/* ── Voucher Klaim Button (teal solid) ── */
.btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: var(--teal);
    color: #fff;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(153, 27, 27, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.btn-wa::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 55%);
    pointer-events: none;
}

.btn-wa:hover {
    background: var(--teal-dk);
    box-shadow: 0 6px 20px rgba(153, 27, 27, 0.42);
}

.btn-wa:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(153, 27, 27, 0.2);
}

/* ── Closing slide: Tutup Surat button ── */
#btn-close-swiper {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dk));
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow: 0 6px 22px rgba(153, 27, 27, 0.32);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin-top: 4px;
    flex-shrink: 0;
}

#btn-close-swiper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent);
    pointer-events: none;
}

#btn-close-swiper:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(153, 27, 27, 0.4);
}

#btn-close-swiper:active {
    transform: scale(0.97);
}