* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: #333; /* Dark background on desktop */
}

/* Mobile Wrapper */
.ecom-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--ecom-bg, #f5f5f5);
    min-height: 100vh;
    position: relative;
    padding-bottom: 60px; /* Space for sticky footer */
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Header */
.checkout-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    padding: 15px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--ecom-border);
}
.checkout-header i {
    font-size: 1.4rem;
    color: var(--ecom-primary);
    cursor: pointer;
    margin-right: 15px;
}

/* Cover Overlay */
#introOverlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--ecom-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}
.cover-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.parcel-icon i {
    font-size: 4rem;
    color: var(--ecom-primary);
    margin-bottom: 10px;
}
.cover-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--ecom-text);
    margin-bottom: 5px;
}
.cover-subtitle {
    color: var(--ecom-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.guest-box {
    background: #f9f9f9;
    border: 1px dashed var(--ecom-border);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.guest-label {
    font-size: 0.8rem;
    color: var(--ecom-muted);
}
.guest-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--ecom-primary);
}
.cover-quote {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.btn-open-paket {
    background: var(--ecom-primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    width: 100%;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
}

/* App initially hidden */
#mainApp { display: none; opacity: 0; transition: opacity 0.5s ease; }

/* Global Audio */
.float-audio {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #fff;
    color: var(--ecom-primary);
    border: 2px solid var(--ecom-primary);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 99;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Slider Section */
.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #ddd;
    overflow: hidden;
}
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.slide.active { opacity: 1; }
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slide-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Cards & Sections */
.card-section {
    background: #fff;
    margin-bottom: 8px;
    padding: 15px;
}
.section-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--ecom-text);
    margin-bottom: 10px;
}
.desc-text {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
}

/* Product Info */
.price-tag {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--ecom-primary);
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.discount-badge {
    background: #fee2e2;
    color: #ef4444;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    border: 1px solid #fca5a5;
}
.product-title {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    font-weight: 500;
    color: var(--ecom-text);
    line-height: 1.4;
}
.product-rating {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #f59e0b; /* yellow stars */
}
.product-rating span {
    color: var(--ecom-muted);
    margin-left: 5px;
}

/* Flash Sale Timer */
.flash-sale-box {
    margin-top: 15px;
    background: linear-gradient(135deg, var(--ecom-primary), #ff7e5f);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fs-label {
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}
.fs-label i { margin-right: 5px; font-size: 1.2rem; }
.countdown-wrapper { display: flex; align-items: center; font-weight: bold;}
.cd-item {
    background: #000;
    color: #fff;
    padding: 4px 6px;
    border-radius: 4px;
    margin: 0 3px;
    font-size: 0.9rem;
}

/* Quotes */
.quote-box {
    text-align: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}
.quote-arab {
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: var(--ecom-primary);
}
.quote-arti {
    font-style: italic;
    font-size: 0.9rem;
    color: #555;
}

/* Shop Profile (Mempelai) */
.shop-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.shop-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid var(--ecom-border);
}
.shop-info { flex: 1; }
.shop-name { font-weight: bold; font-size: 0.95rem; }
.shop-status { font-size: 0.75rem; color: var(--ecom-muted); }
.btn-visit-shop {
    border: 1px solid var(--ecom-primary);
    color: var(--ecom-primary);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 500;
}
.mempelai-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}
.mempelai-card {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid var(--ecom-border);
}
.mempelai-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}
.mempelai-name {
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: 3px;
}
.mempelai-parent {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 8px;
}
.ig-link {
    display: inline-block;
    background: #fdf2f8;
    color: #db2777;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    text-decoration: none;
}
.mempelai-divider {
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-weight: bold;
    color: var(--ecom-muted);
    font-family: serif;
    font-size: 1.5rem;
}

/* Timeline Pengiriman */
.timeline-container {
    border-left: 2px dashed #ddd;
    margin-left: 10px;
    padding-left: 20px;
    margin-top: 15px;
}
.timeline-item {
    position: relative;
    margin-bottom: 25px;
}
.tl-dot {
    position: absolute;
    left: -27px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--ecom-primary);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--ecom-primary);
}
.tl-title { font-weight: bold; font-size: 1rem; color: var(--ecom-text); margin-bottom: 3px; }
.tl-time { font-size: 0.85rem; color: var(--ecom-primary); font-weight: 500; margin-bottom: 5px; }
.tl-location { font-size: 0.85rem; color: #555; margin-bottom: 10px; line-height: 1.4; }
.tl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-outline-primary {
    border: 1px solid var(--ecom-primary);
    color: var(--ecom-primary);
    background: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    cursor: pointer;
}
.btn-outline-secondary {
    border: 1px solid #ccc;
    color: #555;
    background: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
}
.btn-primary {
    background: var(--ecom-primary);
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

/* Livestream */
.livestream-box {
    background: #fee2e2;
    border: 1px solid #fecaca;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}
.ls-header {
    color: #dc2626;
    font-weight: bold;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.ls-header i { margin-right: 5px; font-size: 1.2rem; }
.ls-text { font-size: 0.85rem; color: #7f1d1d; }

/* History (Our Story) */
.history-container { margin-top: 15px; }
.history-item { margin-bottom: 15px; }
.hist-date {
    font-size: 0.8rem;
    color: var(--ecom-muted);
    margin-bottom: 5px;
}
.hist-card {
    background: #f9fafb;
    border: 1px solid var(--ecom-border);
    padding: 12px;
    border-radius: 8px;
}
.hist-title { font-weight: bold; font-size: 0.95rem; margin-bottom: 5px; }
.hist-desc { font-size: 0.85rem; color: #555; margin-bottom: 10px; }
.hist-img { width: 100%; border-radius: 6px; }

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 15px;
}
.gal-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}

/* Kado (Payment Methods) */
.payment-methods { margin-top: 10px; display: grid; gap: 10px; }
.bank-card {
    display: flex;
    align-items: center;
    border: 1px solid var(--ecom-border);
    padding: 12px;
    border-radius: 8px;
    background: #fafafa;
}
.bank-logo {
    width: 40px; height: 40px;
    background: #eee;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    margin-right: 12px; color: #555; font-size: 1.5rem;
}
.bank-info { flex: 1; }
.bank-info strong { font-size: 0.95rem; }
.bank-num { font-size: 1.1rem; font-family: monospace; color: var(--ecom-primary); font-weight: bold; letter-spacing: 1px; }
.bank-an { font-size: 0.8rem; color: #666; }
.btn-copy {
    background: var(--ecom-primary);
    color: #fff; border: none;
    padding: 5px 10px; border-radius: 4px; font-size: 0.75rem; cursor: pointer;
}
.qris-box { text-align: center; margin-top: 15px; border: 1px dashed var(--ecom-border); padding: 15px; border-radius: 8px; }
.qris-title { font-weight: bold; margin-bottom: 10px; color: var(--ecom-primary); }
.qris-img { max-width: 200px; width: 100%; }
.btn-wa-confirm {
    display: flex; justify-content: center; align-items: center;
    background: #25D366; color: #fff; border: none; padding: 10px; border-radius: 8px;
    text-decoration: none; font-weight: 500; font-size: 0.95rem; margin-top: 15px;
}
.btn-wa-confirm i { font-size: 1.3rem; margin-right: 8px; }
.physical-gift { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--ecom-border); }
.address-box {
    background: #f3f4f6; padding: 12px; border-radius: 6px;
    font-size: 0.9rem; color: #374151; font-family: monospace; margin-bottom: 10px;
}

/* RSVP Form */
.form-ecom { margin-top: 15px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 5px; color: #555; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px;
    border: 1px solid var(--ecom-border); border-radius: 6px;
    font-size: 0.95rem; background: #fafafa;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--ecom-primary);
}
.alert-box { padding: 10px; border-radius: 6px; font-size: 0.9rem; margin-top: 10px; }

/* Reviews Container */
.reviews-container { margin-top: 25px; border-top: 1px solid var(--ecom-border); padding-top: 15px; }
.rv-title { font-weight: bold; margin-bottom: 15px; }
.review-item { padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid #eee; }
.review-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.rv-header { display: flex; align-items: flex-start; margin-bottom: 8px; }
.rv-avatar {
    width: 32px; height: 32px; background: #ddd; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; margin-right: 10px; color: #777;
}
.rv-user-info { flex: 1; }
.rv-user-info strong { display: block; font-size: 0.9rem; }
.rv-stars { color: #f59e0b; font-size: 0.75rem; }
.rv-badge {
    color: #fff; font-size: 0.65rem; padding: 2px 6px; border-radius: 4px; font-weight: bold;
}
.rv-text { font-size: 0.85rem; color: #444; line-height: 1.4; margin-bottom: 5px; }
.rv-date { font-size: 0.75rem; color: #999; }

/* Footer */
.footer-text { text-align: center; padding: 20px; color: var(--ecom-muted); font-size: 0.85rem; }
.footer-couple { font-family: 'Philosopher', serif; font-size: 1.5rem; font-weight: bold; color: var(--ecom-primary); margin: 15px 0 5px; }

/* Checkout Bottom Bar */
.checkout-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-width: 480px; margin: 0 auto;
    background: #fff;
    display: flex; align-items: center;
    border-top: 1px solid var(--ecom-border);
    height: 60px;
    z-index: 100;
}
.cb-icon {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #666; font-size: 0.7rem; border-right: 1px solid #eee; height: 100%; cursor: pointer;
}
.cb-icon i { font-size: 1.3rem; margin-bottom: 2px; color: var(--ecom-primary); }
.cb-price {
    flex: 2; padding: 0 10px; text-align: right; display: flex; flex-direction: column; justify-content: center;
}
.cb-price span { font-size: 0.7rem; color: #666; }
.cb-price strong { font-size: 1.1rem; color: var(--ecom-primary); }
.cb-btn-checkout {
    flex: 1.5; background: var(--ecom-primary); color: #fff; height: 100%;
    display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.95rem; text-decoration: none; cursor: pointer;
}

/* Animations */
@keyframes popupFadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
body.popup-active { overflow: hidden; }

/* Custom Tone Colors */
body[data-tone="tokopedia"] {
    --ecom-primary: #03ac0e;
}
body[data-tone="shopee"] {
    --ecom-primary: #ee4d2d;
}

/* Popup Mempelai */
#mempelaiPopup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#mempelaiPopup.show { opacity: 1; }
.mempelai-popup-box {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
#mempelaiPopup.show .mempelai-popup-box { transform: translateY(0); }
.mp-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 1.8rem;
    color: #666;
    cursor: pointer;
}
.mp-img {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--ecom-primary);
}
.mp-name {
    font-weight: bold;
    font-size: 1.3rem;
    color: var(--ecom-text);
    margin-bottom: 8px;
}
.mp-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}
