@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Oswald:wght@500;700&family=Amiri:wght@400;700&display=swap');

:root {
--primary: #0f172a; /* Slate 900 */
--primary-dark: #020617;
--accent: #3b82f6; /* Blue 500 */
--accent-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
--surface: #ffffff;
--bg-body: #f8fafc;
--text-main: #1e293b;
--text-muted: #64748b;
}

body {
font-family: 'Plus Jakarta Sans', sans-serif;
background: var(--bg-body);
margin: 0;
padding: 0;
-webkit-tap-highlight-color: transparent;
padding-bottom: 100px;
color: var(--text-main);
min-height: 100vh;
overflow-x: hidden;
scroll-behavior: smooth;
}

/* --- Global Animations --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-5px); } 100% { transform: translateY(0px); } }

.animate-enter { animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-pop { animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

/* --- Splash Screen --- */
.splash-screen {
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
background: var(--primary);
display: flex; flex-direction: column; justify-content: center; align-items: center;
z-index: 9999;
background-image: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}
.splash-content { text-align: center; animation: float 3s ease-in-out infinite; }
.splash-logo {
font-family: 'Oswald', sans-serif; font-size: 56px; line-height: 1;
font-weight: 700; color: #fff; letter-spacing: -1px;
text-shadow: 0 10px 30px rgba(0,0,0,0.3);
margin-bottom: 30px;
}
.splash-logo span { color: var(--accent); }
.loader-track {
width: 180px; height: 6px; background: rgba(255,255,255,0.1);
border-radius: 10px; overflow: hidden; position: relative; margin: 0 auto;
}
.loader-fill {
height: 100%; background: var(--accent); width: 0%;
animation: fillBar 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
box-shadow: 0 0 15px var(--accent);
}
@keyframes fillBar { 0% { width: 0%; } 100% { width: 100%; } }

/* --- Auth & PIN Screens --- */
.auth-bg {
min-height: 100vh;
background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
display: flex; flex-direction: column; align-items: center; justify-content: center;
padding: 24px;
position: relative;
overflow: hidden;
}
/* Decorative circles behind auth */
.auth-bg::before { content: ''; position: absolute; top: -100px; right: -100px; width: 300px; height: 300px; background: rgba(59, 130, 246, 0.1); border-radius: 50%; filter: blur(60px); }
.auth-bg::after { content: ''; position: absolute; bottom: -50px; left: -50px; width: 250px; height: 250px; background: rgba(15, 23, 42, 0.05); border-radius: 50%; filter: blur(60px); }

.auth-card {
width: 100%; max-width: 380px;
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(20px);
border-radius: 32px;
padding: 40px 30px;
box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.15);
border: 1px solid rgba(255, 255, 255, 0.8);
text-align: center;
z-index: 10;
}

.input-group { position: relative; margin-bottom: 16px; width: 100%; }
.input-box {
width: 100%; padding: 20px 24px;
background: #f8fafc; border-radius: 20px;
border: 2px solid transparent; outline: none;
font-size: 15px; font-weight: 600; color: var(--primary);
transition: all 0.3s ease;
}
.input-box:focus {
background: #fff; border-color: var(--accent);
box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.15);
transform: translateY(-2px);
}
.input-box::placeholder { color: #94a3b8; font-weight: 500; }

.btn-main {
width: 100%; background: var(--primary);
color: #fff; padding: 20px; border-radius: 20px;
font-weight: 700; font-size: 15px; letter-spacing: 0.5px;
transition: all 0.2s; box-shadow: 0 15px 30px -5px rgba(15, 23, 42, 0.25);
border: none; cursor: pointer; margin-top: 10px;
position: relative; overflow: hidden;
}
.btn-main::after {
content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0));
opacity: 0; transition: 0.2s;
}
.btn-main:active { transform: scale(0.97); box-shadow: 0 5px 15px rgba(15, 23, 42, 0.2); }

.pin-display {
font-size: 32px; letter-spacing: 16px; font-weight: 800;
background: #fff; border: 2px solid #e2e8f0;
color: var(--primary); text-align: center;
border-radius: 24px; padding: 24px;
width: 100%; max-width: 280px; margin: 20px auto;
box-shadow: inset 0 4px 10px rgba(0,0,0,0.03);
transition: 0.3s;
}
.pin-display:focus { border-color: var(--primary); box-shadow: 0 15px 40px -10px rgba(15, 23, 42, 0.1); transform: translateY(-5px); }

/* --- Home Layout --- */
.home-header {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(25px);
-webkit-backdrop-filter: blur(25px);
position: sticky; top: 0; z-index: 50;
padding: 20px 24px 15px 24px;
border-bottom-left-radius: 35px;
border-bottom-right-radius: 35px;
box-shadow: 0 15px 40px -15px rgba(0,0,0,0.08);
border-bottom: 1px solid rgba(255,255,255,0.5);
}

.search-bar {
position: relative; margin-bottom: 20px;
box-shadow: 0 10px 30px -5px rgba(0,0,0,0.06);
border-radius: 20px;
}
.search-input {
width: 100%; background: #ffffff;
padding: 18px 20px 18px 50px; border-radius: 20px;
font-size: 14px; font-weight: 600; color: var(--primary);
outline: none; border: 1px solid transparent;
transition: 0.3s;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }

.chips-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 5px 2px 15px 2px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
padding: 10px 20px; border-radius: 16px;
background: #ffffff; border: 1px solid #f1f5f9;
color: #64748b; font-size: 13px; font-weight: 700;
white-space: nowrap; cursor: pointer; transition: 0.2s;
box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.filter-chip.active {
background: var(--primary); color: #fff;
border-color: var(--primary);
box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.4);
transform: translateY(-2px);
}

.grid-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 24px; padding-top: 10px; }

/* --- Product Card --- */
.card-item {
background: #ffffff; border-radius: 28px; padding: 18px;
display: flex; flex-direction: column; align-items: center;
text-align: center; justify-content: space-between;
box-shadow: 0 10px 30px -10px rgba(0,0,0,0.06);
border: 1px solid #f8fafc;
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
position: relative; overflow: hidden;
opacity: 0; /* For animation */
}
.card-item:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1); }
.card-item:active { transform: scale(0.97); }

.prod-img-box {
width: 100%; aspect-ratio: 1/1;
background: #f8fafc; border-radius: 20px;
display: flex; align-items: center; justify-content: center;
margin-bottom: 12px;
color: #cbd5e1; font-size: 30px;
}
.prod-img-box svg, .prod-img-box div { width: 50%; height: 50%; display: flex; align-items: center; justify-content: center; }

.btn-order {
width: 100%; background: var(--primary); color: #fff;
padding: 14px; border-radius: 16px; font-weight: 700;
font-size: 12px; letter-spacing: 1px; transition: 0.2s;
box-shadow: 0 8px 20px -5px rgba(15, 23, 42, 0.3); border: none;
}
.btn-order:disabled { background: #e2e8f0; color: #94a3b8; box-shadow: none; }

/* --- Bottom Nav --- */
.bottom-nav {
position: fixed; bottom: 25px; left: 0; right: 0; margin: 0 auto;
width: 90%; max-width: 360px;
background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(20px);
border-radius: 30px; padding: 12px 30px;
display: flex; justify-content: space-between; align-items: center;
box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.5);
z-index: 100; border: 1px solid rgba(255,255,255,0.1);
}
.nav-item {
opacity: 0.6; transition: 0.3s; padding: 10px;
display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.nav-item svg { width: 24px; height: 24px; color: white; transition: 0.3s; }
.nav-item span { font-size: 10px; font-weight: 700; color: white; opacity: 0; height: 0; transition: 0.3s; }
.nav-item.active { opacity: 1; transform: translateY(-4px); }
.nav-item.active span { opacity: 1; height: auto; }
.nav-item.active svg { color: var(--accent); filter: drop-shadow(0 0 10px var(--accent)); }

/* --- Modals --- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(12px); z-index: 200; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; }
.modal-box {
background: #fff; width: 90%; max-width: 340px;
padding: 35px; border-radius: 35px;
box-shadow: 0 30px 80px rgba(0,0,0,0.4);
transform: scale(0.9); transition: transform 0.3s;
text-align: center;
}
.modal-show { opacity: 1; pointer-events: auto; display: flex; }
.modal-show .modal-box { transform: scale(1); }

.qty-control { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; padding: 10px; border-radius: 20px; margin: 25px 0; border: 1px solid #e2e8f0; }
.qty-btn { width: 40px; height: 40px; border-radius: 14px; background: #fff; border: 1px solid #cbd5e1; color: var(--primary); font-size: 18px; font-weight: 700; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.qty-val { font-size: 20px; font-weight: 800; color: var(--primary); }

.hidden { display: none !important; }

/* Namaz Grid */
.namaz-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 20px; }
.namaz-card { background: white; padding: 12px 5px; border-radius: 18px; border: 1px solid #f1f5f9; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.02); transition: 0.3s; }
.namaz-card.active { border-color: var(--accent); background: #eff6ff; }
.namaz-name { font-size: 10px; font-weight: 800; color: #94a3b8; text-transform: uppercase; margin-bottom: 4px; }
.namaz-time { font-size: 12px; font-weight: 800; color: var(--primary); }

/* Hadees Card */
.hadees-card { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); padding: 25px; border-radius: 30px; margin-bottom: 25px; color: white; position: relative; overflow: hidden; }
.hadees-card::after { content: '❞'; position: absolute; bottom: -10px; right: 20px; font-size: 80px; opacity: 0.1; font-family: serif; }