@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- RESET & VARIABLES --- */
:root {
    --primary: #ff8c00;
    --primary-dark: #e67e00;
    --bg-color: #f8f9fa;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; outline: none; }
body { background-color: #f0f2f5; color: var(--text-main); display: flex; justify-content: center; min-height: 100vh; }
a { text-decoration: none; color: inherit; }

/* --- MOBILE CONTAINER --- */
.app-container {
    width: 100%; max-width: 480px; 
    background: var(--white); 
    min-height: 100vh; 
    box-shadow: 0 0 20px rgba(0,0,0,0.05); 
    position: relative; 
    padding-bottom: 100px; /* Space for bottom nav */
}

/* --- COMPONENTS --- */
.text-orange { color: var(--primary); }
.font-bold { font-weight: 600; }
.hidden { display: none !important; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 20px; border-radius: var(--radius); font-weight: 600;
    cursor: pointer; transition: 0.2s; border: none; font-size: 0.95rem; width: 100%;
}
.btn-primary {
    background: var(--primary); color: white;
    box-shadow: 0 4px 10px rgba(255, 140, 0, 0.2);
}
.btn-primary:active { transform: scale(0.98); }
.btn-outline {
    background: white; border: 1.5px solid var(--primary); color: var(--primary);
}

/* --- HOME PAGE --- */
.profile-section {
    background: linear-gradient(180deg, #FFF8F0 0%, #FFFFFF 100%);
    padding: 40px 20px 20px; text-align: center; border-bottom: 1px solid #f0f0f0;
}
.avatar-wrap { position: relative; display: inline-block; margin-bottom: 10px; }
.avatar { 
    width: 85px; height: 85px; border-radius: 50%; object-fit: cover; 
    border: 3px solid white; box-shadow: var(--shadow-md);
}
.verified-badge {
    position: absolute; bottom: 5px; right: 0; 
    background: var(--primary); color: white; width: 22px; height: 22px; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    border: 2px solid white; font-size: 0.7rem;
}
.username { font-size: 1.25rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.bio { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; line-height: 1.4; }

.social-bar { display: flex; justify-content: center; gap: 12px; margin-bottom: 10px; }
.soc-icon {
    width: 40px; height: 40px; border-radius: 50%; background: #fff;
    border: 1px solid #eee; display: flex; align-items: center; justify-content: center;
    color: #555; transition: 0.2s; font-size: 1.1rem;
}
.soc-icon:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* Product List */
.product-grid { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.product-card {
    background: white; border: 1px solid #eee; border-radius: 16px; padding: 12px;
    display: flex; align-items: center; gap: 15px; cursor: pointer;
    transition: all 0.2s; position: relative; overflow: hidden;
}
.product-card:active { background: #fafafa; }
.prod-thumb { 
    width: 70px; height: 70px; border-radius: 12px; object-fit: cover; 
    background: #f3f4f6; flex-shrink: 0;
}
.prod-info { flex: 1; }
.prod-title { font-size: 0.95rem; font-weight: 600; color: var(--text-main); margin-bottom: 4px; line-height: 1.3; }
.prod-price { font-size: 0.9rem; color: var(--primary); font-weight: 700; }
.prod-arrow { color: #ddd; }

/* --- PRODUCT DETAIL --- */
.nav-header {
    position: sticky; top: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(5px);
    padding: 15px 20px; display: flex; justify-content: space-between; align-items: center;
    z-index: 50; border-bottom: 1px solid #eee;
}
.nav-btn { background: none; border: none; font-size: 1.2rem; color: #333; cursor: pointer; padding: 5px; }

.detail-image-box { width: 100%; height: 320px; background: #f9fafb; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail-img { width: 100%; height: 100%; object-fit: cover; }
.detail-content { padding: 20px; }
.detail-price-lg { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin: 10px 0; }
.desc-box { background: #f8f9fa; padding: 15px; border-radius: var(--radius); margin-top: 15px; }
.desc-text { font-size: 0.9rem; color: #4b5563; line-height: 1.6; white-space: pre-wrap; }

/* Sticky Bottom Action */
.bottom-action-bar {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px; background: white; padding: 15px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08); display: flex; gap: 12px; z-index: 100;
}

/* --- CHECKOUT --- */
.checkout-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 15px; }
.checkout-title { font-size: 1.1rem; font-weight: 700; }
.form-section { padding: 20px; border-bottom: 8px solid #f8f9fa; }
.section-label { font-size: 0.85rem; font-weight: 700; color: #9ca3af; margin-bottom: 12px; letter-spacing: 0.5px; }

.input-field {
    width: 100%; padding: 14px; border: 1px solid #e5e7eb; border-radius: var(--radius);
    font-size: 1rem; margin-bottom: 15px; transition: 0.2s; background: #f9fafb;
}
.input-field:focus { background: white; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,140,0,0.1); }

.payment-trigger {
    border: 1px solid #e5e7eb; padding: 15px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: space-between; cursor: pointer;
}
.payment-trigger.selected { border-color: var(--primary); background: #fffbf0; }

.summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; color: #4b5563; }
.total-row { display: flex; justify-content: space-between; margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; font-weight: 700; font-size: 1.1rem; color: var(--text-main); }

/* --- MODALS --- */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 1000; backdrop-filter: blur(2px);
}
.modal-overlay.active { display: flex; }

/* Bottom Sheet */
.bottom-sheet {
    align-self: flex-end; width: 100%; max-width: 480px; margin: 0 auto;
    background: white; border-radius: 24px 24px 0 0; padding: 25px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Center Popup */
.center-popup {
    align-self: center; width: 90%; max-width: 400px; margin: 0 auto;
    background: white; border-radius: 20px; padding: 25px;
    animation: zoomIn 0.2s ease-out; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
@keyframes zoomIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.pay-card {
    border: 1px solid #eee; border-radius: 12px; padding: 15px; text-align: center; cursor: pointer;
}
.pay-card:hover { border-color: var(--primary); background: #fffbf0; }
.pay-card img { height: 25px; margin-bottom: 5px; }
.pay-card span { display: block; font-size: 0.8rem; font-weight: 600; }

/* --- CAROUSEL / SLIDER GAYA LYNK.ID --- */
.carousel-container {
    position: relative;
    width: 100%;
    height: 380px; /* Tinggi area gambar */
    background: #f0f0f0;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 100%;
    scrollbar-width: none; /* Sembunyikan scrollbar di Firefox */
}
.carousel-track::-webkit-scrollbar { display: none; /* Chrome/Safari */ }

.carousel-item {
    flex: 0 0 100%; /* Lebar 100% dari container */
    scroll-snap-align: center;
    height: 100%;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Indikator Titik (Dots) */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    transition: 0.3s;
}

.dot.active {
    background: #ff8c00;
    width: 20px;
    border-radius: 10px;
}