/* =========================================
   CHIKII STORE - ULTIMATE STYLE (FINAL FIXED)
   - Fixed Image Visibility (White Background)
   ========================================= */

/* --- 1. VARIABLES --- */
:root {
    --bg-color: #000000;
    --card-bg: #111111;
    --text-color: #ffffff;
    --accent-color: #00d4ff;
    --nav-height: 70px;
    --success-color: #00ff88;
    --warning-color: #ffcc00;
    --danger-color: #ff4444;
}

[data-theme="blue"] {
    --bg-color: #02050a;
    --card-bg: rgba(20, 30, 50, 0.8);
    --text-color: #e0f2fe;
}

body {
    margin: 0; padding: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at top, #1e3a8a 0%, #000000 70%);
    background-attachment: fixed;
    color: var(--text-color);
    padding-bottom: calc(var(--nav-height) + 20px);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.5s ease;
}

/* --- 2. HEADER & TICKER --- */
.header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; position: sticky; top: 0; z-index: 100;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
}
.brand-title { font-weight: 800; font-size: 18px; color: #fff; text-transform: uppercase; animation: neonPulse 2s infinite alternate; }
@keyframes neonPulse { from { text-shadow: 0 0 5px #fff, 0 0 10px var(--accent-color); } to { text-shadow: 0 0 10px #fff, 0 0 20px var(--accent-color); } }

.theme-btn { background: #222; color: #fff; border: 1px solid #333; padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer; }
.news-ticker { background: #111; color: var(--warning-color); padding: 8px 0; font-size: 12px; overflow: hidden; white-space: nowrap; }
.ticker-text { display: inline-block; animation: scroll 15s linear infinite; padding-left: 100%; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* --- 3. BANNER --- */
.banner-container { padding: 15px; }
.slider-wrapper { border-radius: 16px; overflow: hidden; border: 1px solid #333; aspect-ratio: 16/7; position: relative; }
.slide { width: 100%; height: 100%; object-fit: cover; display: none; }
.slide.active { display: block; }

/* --- 4. PRODUCT GRID (IMAGE FIX HERE) --- */
.section-title { text-align: center; font-weight: 900; margin: 10px 0; font-size: 16px; color: #fff; }
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 15px; }
@media (max-width: 360px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }

.card {
    background: var(--card-bg); border: 1px solid #333; border-radius: 12px;
    padding: 10px; text-align: center; position: relative; overflow: hidden;
}
.card:active { transform: scale(0.96); }

/* 🔥 ဒီနေရာ ပြင်ထားပါတယ် (ပုံနောက်ခံအဖြူ) */
.card-img { 
    width: 100%; 
    aspect-ratio: 1/1; 
    object-fit: contain; 
    margin-bottom: 8px;
    background-color: #ffffff; /* White Background Added */
    border-radius: 10px;       /* Smooth Corners */
    padding: 10px;             /* Spacing inside white box */
    box-sizing: border-box;
}

.card-name { font-size: 12px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.card-badge { position: absolute; top: 5px; right: 5px; background: var(--danger-color); color: white; font-size: 9px; padding: 2px 6px; border-radius: 8px; font-weight: bold; }
.stars { color: var(--warning-color); font-size: 10px; display: block; margin-bottom: 8px; }
.buy-btn { width: 100%; background: transparent; border: 1px solid var(--accent-color); color: var(--accent-color); padding: 6px; border-radius: 8px; font-size: 12px; font-weight: bold; cursor: pointer; }
/* style.css (Line 87-100 ဝန်းကျင်) */
.page { 
    display: none; 
    opacity: 0; 
}

.page.active { 
    display: block; 
    animation: fadeInQuick 0.2s ease-in forwards; 
}

@keyframes fadeInQuick { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

/* TikTok Style Card Animation - Line 55 ဝန်းကျင်က .card ကို ပြင်ပါ */
.card {
    background: var(--card-bg);
    border: 1px solid #333;
    border-radius: 12px; 
    overflow: hidden;
    display: flex; flex-direction: column; align-items: center;
    padding-bottom: 10px;
    opacity: 0; /* အစမှာ ဖျောက်ထားမယ် */
    transform: translateY(30px) scale(0.95); 
    transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}




/* --- 6. PRODUCT DETAILS PAGE --- */
#page-product-details { z-index: 200; background: var(--bg-color); min-height: 100vh; }
#pd-hero { height: 250px; background: linear-gradient(to bottom, #1a1a2e, #000); display: flex; align-items: center; justify-content: center; padding-top: 20px; }
#pd-img { width: 140px; height: 140px; object-fit: contain; filter: drop-shadow(0 0 20px rgba(0,212,255,0.3)); }

.region-scroller { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.region-chip { padding: 8px 16px; background: #222; border: 1px solid #333; border-radius: 20px; color: #888; font-size: 13px; white-space: nowrap; cursor: pointer; }
.region-chip.active { background: rgba(0, 212, 255, 0.1); border-color: var(--accent-color); color: var(--accent-color); }

.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amount-btn { background: #111; border: 1px solid #333; border-radius: 12px; padding: 15px 5px; text-align: center; cursor: pointer; transition: 0.2s; }
.amount-btn.active { background: #00d4ff; color: black; border-color: #00d4ff; box-shadow: 0 0 15px rgba(0, 212, 255, 0.4); }

.pd-footer { position: fixed; bottom: 0; left: 0; width: 100%; background: #111; border-top: 1px solid #333; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; padding-bottom: env(safe-area-inset-bottom); z-index: 201; }

/* --- 7. PAYMENT PAGE --- */
.payment-card { background: #1a1a1a; border: 1px solid #333; padding: 15px; border-radius: 12px; display: flex; align-items: center; margin-bottom: 10px; }
.copy-btn { background: #333; color: white; border: none; padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.upload-box { width: 100%; height: 150px; border: 2px dashed #333; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #111; cursor: pointer; margin-top: 10px; overflow: hidden; }

/* --- 8. REVIEWS & MISC --- */
.review-slider { display: flex; overflow-x: auto; gap: 15px; padding: 10px 15px; scrollbar-width: none; }
.review-card { min-width: 240px; background: #1a1a1a; padding: 15px; border-radius: 12px; border: 1px solid #333; }
.category-btn { background: #1a1a1a; color: white; border: 1px solid #333; padding: 20px; border-radius: 15px; font-size: 16px; font-weight: bold; display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* --- 9. MODALS --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 3000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-content { background: #111; width: 85%; max-width: 400px; border-radius: 20px; border: 1px solid #333; padding: 20px; max-height: 80vh; overflow-y: auto; animation: zoomIn 0.2s ease; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.close-btn { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }

/* --- 10. AUTH & TOAST --- */
.auth-input { width: 100%; padding: 15px; margin: 8px 0; background: #222; border: 1px solid #333; color: white; border-radius: 12px; font-size: 16px; box-sizing: border-box; outline: none; }
.auth-btn { width: 100%; padding: 15px; margin-top: 15px; background: var(--accent-color); color: #000; border: none; border-radius: 12px; font-weight: bold; font-size: 16px; cursor: pointer; }
/* --- CUSTOM TOAST NOTIFICATION (Image 3 Style) --- */
#toast {
    visibility: hidden; /* ပုံမှန်ချိန်မှာ မပေါ်ဘူး */
    min-width: 300px;
    background-color: #d4edda; /* အစိမ်းနုရောင် နောက်ခံ */
    color: #155724;            /* အစိမ်းရင့်ရောင် စာလုံး */
    text-align: center;
    border-radius: 50px;       /* ဘဲဥပုံ အဝိုင်း */
    padding: 15px 25px;
    position: fixed;
    z-index: 4000;             /* အပေါ်ဆုံးမှာ ပေါ်မယ် */
    left: 50%;
    top: 30px;                 /* အပေါ်ကနေ ၃၀ pixels အကွာ */
    transform: translateX(-50%); /* အလယ်တည့်တည့်ကျအောင် */
    box-shadow: 0 10px 25px rgba(0,0,0,0.3); /* အရိပ်ထည့်မယ် */
    border: 1px solid #c3e6cb;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;                 /* Icon နဲ့ စာ ကြားအကွာအဝေး */
}

/* JS ကနေ show class ထည့်လိုက်ရင် ဒီ Animation အလုပ်လုပ်မယ် */
#toast.show {
    visibility: visible;
    animation: slideDown 0.5s, slideUp 0.5s 2.5s forwards;
}

/* အပေါ်ကနေ လျောဆင်းလာမယ့် Animation */
@keyframes slideDown {
    from { top: -100px; opacity: 0; }
    to { top: 30px; opacity: 1; }
}

/* ပြန်လျောတက်သွားမယ့် Animation */
@keyframes slideUp {
    from { top: 30px; opacity: 1; }
    to { top: -100px; opacity: 0; }
}


/* --- 11. PROFILE & HISTORY --- */
.wallet-card { background: linear-gradient(135deg, #1a1a2e 0%, #000000 100%); border: 1px solid #333; border-radius: 20px; padding: 25px; position: relative; }
.menu-item { background: #111; border: 1px solid #222; padding: 15px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.history-card { background: #131313; border-radius: 16px; padding: 15px; margin-bottom: 12px; border: 1px solid #222; display: flex; justify-content: space-between; align-items: center; }
.history-card.completed { border-left: 4px solid var(--success-color); }
.history-card.pending { border-left: 4px solid var(--warning-color); }

/* --- 12. BOTTOM NAV --- */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: var(--nav-height); background: rgba(10, 10, 10, 0.95); border-top: 1px solid #222; display: flex; justify-content: space-around; backdrop-filter: blur(10px); z-index: 1000; padding-bottom: env(safe-area-inset-bottom); }
.nav-btn { background: none; border: none; color: #666; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; }
.nav-btn.active { color: var(--accent-color); }
.nav-btn .icon { font-size: 22px; margin-bottom: 4px; }

/* --- 13. CART --- */
.cart-item { display: flex; align-items: center; background: #111; border: 1px solid #222; padding: 10px; border-radius: 12px; margin-bottom: 10px; }
.cart-thumb { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; margin-right: 12px; }
.cart-info { flex: 1; }
.cart-title { font-size: 14px; font-weight: bold; color: #fff; }
.cart-meta { font-size: 12px; color: #888; }
.remove-btn { color: var(--danger-color); cursor: pointer; padding: 5px; font-size: 18px; }

/* --- NEW HISTORY LIST STYLE (Drill-down) --- */
.history-list-item {
    display: flex; align-items: center;
    background: #1a1a1a; border: 1px solid #333;
    padding: 15px; border-radius: 15px;
    margin-bottom: 10px; transition: 0.2s;
    cursor: pointer;
}
.history-list-item:active { transform: scale(0.98); background: #222; }

/* Icon Left */
.history-icon { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; margin-right: 15px; background: #fff; padding: 2px; }

/* Info Middle */
.history-info { flex: 1; }
.h-title { color: white; font-weight: bold; font-size: 14px; margin-bottom: 4px; }
.h-date { color: #666; font-size: 11px; }
.h-status { font-size: 10px; padding: 2px 8px; border-radius: 6px; display: inline-block; margin-top: 4px; font-weight: bold; }
.h-status.success { background: rgba(0, 255, 136, 0.15); color: #00ff88; }
.h-status.pending { background: rgba(255, 204, 0, 0.15); color: #ffcc00; }

/* Price Right */
.h-price { color: white; font-weight: bold; font-size: 14px; text-align: right; }
.arrow-icon { color: #666; font-size: 18px; margin-left: 10px; }

/* Detail Modal Styling */
.detail-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #333; }
.detail-label { color: #888; font-size: 13px; }
.detail-val { color: white; font-weight: bold; font-size: 13px; }
.code-btn { width: 100%; background: #00d4ff; color: #000; padding: 12px; border-radius: 10px; border: none; font-weight: bold; margin-top: 20px; cursor: pointer; font-size: 14px; }


/* --- NEW PROFILE PAGE STYLES (Added for Image 2 & 3 Design) --- */

/* 1. Profile Header (ပုံ ၂ ပုံစံ - နာမည်နဲ့ UID ကဒ်) */
.profile-header {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* အရိပ်ထည့်ထားသည် */
}

.profile-avatar {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #00d4ff, #0055ff); /* အပြာရောင် Gradient */
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    flex-shrink: 0;
}

.profile-info { flex: 1; overflow: hidden; }
.p-name { color: white; font-weight: bold; font-size: 18px; margin-bottom: 2px; }
.p-email { color: #888; font-size: 13px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.p-uid { 
    background: #000; color: #666; 
    font-size: 11px; padding: 3px 8px; 
    border-radius: 6px; border: 1px solid #333; 
    display: inline-block; font-family: monospace;
}

/* 2. Menu Card (ပုံ ၃ ပုံစံ - My Orders ခလုတ်) */
.menu-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 15px;
    display: flex; align-items: center; gap: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* နှိပ်လိုက်ရင် ခွက်ဝင်သွားမည့် Effect */
.menu-card:active { 
    transform: scale(0.98); 
    background: #222; 
    border-color: #555;
}

.menu-icon-box {
    width: 45px; height: 45px;
    background: rgba(0, 255, 136, 0.1); /* အစိမ်းနုရောင် နောက်ခံ */
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #00ff88; /* အစိမ်းရောင် Icon */
    font-size: 20px;
    flex-shrink: 0;
}
