/* Mobile-first UI styled to closely match the provided screenshot */
:root{
  --bg:#F5F7FA;
  --surface:#FFFFFF;
  --muted:#7886A0;
  --text:#0E2233;
  --primary:#E94962;           /* bottom bar pink/red */
  --primary-600:#E33652;
  --accent:#1DB6A6;            /* teal accents */
  --teal-50:#E9FBF8;
  --shadow: 0 4px 14px rgba(16,24,40,.08);
  --radius:16px;
}

/* Global Site Footer (mobile-first) */
.site-footer{background:#fff; border-top:1px solid #E6E8F0; margin-top:16px}
.site-footer .inner{max-width:480px; margin:0 auto; padding:16px 12px}
.footer-grid{display:grid; gap:14px}
.footer-brand{display:flex; align-items:center; gap:8px}
.footer-brand .logo{height:28px}
.footer-brand .name{font-weight:800; color:#0F172A}
.footer-links{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.footer-links a{color:#475569; text-decoration:none; font-size:13px}
.footer-links a:hover{color:#0F172A}
.footer-contact{font-size:13px; color:#475569}
.footer-contact .row{display:flex; align-items:center; gap:8px; margin:4px 0}
.footer-social{display:flex; align-items:center; gap:10px}
.footer-social a{height:32px; width:32px; border-radius:50%; display:grid; place-items:center; background:#F1F5F9; color:#0F172A; border:1px solid #E6E8F0}
.footer-copy{margin-top:8px; padding-top:8px; border-top:1px solid #EEF2F7; font-size:12px; color:#6B7280}

@media (min-width:992px){
  .site-footer .inner{max-width:1100px; padding:20px}
  .footer-grid{grid-template-columns:2fr 1fr 1fr; align-items:start}
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  color:var(--text);
  background:var(--bg);
}
#app{min-height:100%; max-width:480px; margin:0 auto; padding-bottom:96px;}

/* Header */
.app-header{position:sticky; top:0; z-index:10; background:var(--bg); padding:12px 12px 4px}
.search-bar{
  display:flex; align-items:center; gap:10px; width:100%;
  background:#EEF3F7; border-radius:18px; padding:8px 10px; box-shadow:var(--shadow);
}
.search-bar input{flex:1; border:0; background:transparent; outline:0; font-size:14px; color:#223}
.icon-btn{height:36px; width:36px; border-radius:50%; display:grid; place-items:center; background:transparent; color:#233; border:1px solid #dbe4ea}
.icon-btn.solid{background:var(--text); color:#fff; border-color:var(--text)}
.icon-btn:active{transform:scale(.96)}

/* Hero */
.hero-banner{margin-top:12px; border-radius:18px; overflow:hidden; position:relative; height:140px; background:linear-gradient(135deg,#FF6F91 0%,#FF5370 50%,#FF3D57 100%)}
.hero-slider{display:flex; width:100%; height:100%; overflow-x:auto; scroll-behavior:smooth; -webkit-overflow-scrolling:touch}
.h-slide{flex:none; width:100%; height:100%; background-size:cover; background-position:center; background-repeat:no-repeat}
.hero-dots{position:absolute; bottom:12px; left:50%; transform:translateX(-50%); display:flex; gap:6px; z-index:2}
.hero-dot{width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,0.5); cursor:pointer; transition:all 0.3s}
.hero-dot.active{background:rgba(255,255,255,0.9); transform:scale(1.2)}
.hero-content{position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; padding:18px; color:#fff;}
.hero-content h2{margin:0 0 6px; font-weight:700; font-size:18px}
.hero-content p{margin:0; opacity:.95; font-size:13px}

/* Shipping strip */
.shipping-strip{display:flex; align-items:center; justify-content:space-between; gap:10px; margin:12px 2px 0; background:#FFEFF2; border-radius:14px; padding:12px 12px 12px 10px; border:1px solid #FFD6DE}
.ship-left{display:flex; align-items:center; gap:8px; color:#6A1020}
.pill-btn{background:#fff; color:#6A1020; border:1px solid #FFC9D4; padding:8px 12px; border-radius:999px; font-weight:600}

/* Sections */
.app-main{padding:10px 12px 20px}
.section{margin-top:14px}
.section-title{display:flex; align-items:center; gap:8px; padding:0 4px}
.section-title h3{margin:0; font-size:16px}
.section-title .emoji{font-size:18px}

/* Categories */
.category-scroller{display:grid; grid-auto-flow:column; grid-auto-columns:96px; gap:12px; overflow-x:auto; padding:10px 2px 2px}
.category-scroller::-webkit-scrollbar{display:none}
.category-card{background:transparent; text-decoration:none; color:inherit; display:block; position:relative}
.price-badge{position:absolute; top:-6px; left:8px; background:#E7FCEB; color:#188C3E; border:1px solid #C2F0CD; padding:2px 6px; border-radius:999px; font-size:11px; font-weight:600}
.cat-avatar{height:72px; width:72px; border-radius:50%; display:grid; place-items:center; color:#fff; font-weight:700; margin:10px auto 8px; box-shadow:var(--shadow)}
.bg-pink{background:linear-gradient(135deg,#FF8AA5,#FF4D6D)}
.bg-teal{background:linear-gradient(135deg,#3CD6C6,#1DB6A6)}
.bg-blue{background:linear-gradient(135deg,#7EB3FF,#4D7CFE)}
.bg-purple{background:linear-gradient(135deg,#B48CFF,#7C49F6)}
.bg-orange{background:linear-gradient(135deg,#FFB27D,#FF7A39)}
.bg-green{background:linear-gradient(135deg,#9BEBA5,#3FBF5A)}
.cat-name{text-align:center; font-size:12px; line-height:1.2; color:#203046}

/* Products */
.products-grid{display:grid; grid-template-columns:repeat(2, 1fr); gap:12px}
.product-card{background:var(--surface); border-radius:16px; box-shadow:var(--shadow); padding:8px; position:relative; overflow:hidden; display:flex; flex-direction:column; min-height:280px}
.discount{position:absolute; top:8px; left:8px; background:#FFEBEE; color:#D7263D; font-weight:700; border-radius:999px; padding:4px 8px; font-size:11px; border:1px solid #FFD4DB}
.product-image{height:128px; border-radius:12px; background:linear-gradient(135deg,#F2F4F7,#E4E7EC); border:1px solid #E7ECF2; background-size:cover !important; background-position:center !important; background-repeat:no-repeat !important}
.product-image.alt{background:linear-gradient(135deg,#ECFDF3,#D1FADF); border-color:#D1FADF; background-size:cover !important; background-position:center !important; background-repeat:no-repeat !important}
/* Quick Add button (global) */
.product-card .quick-add{display:block; width:100%; border:0; background:#D72A4E; color:#fff; padding:10px 12px; border-radius:4px; font-weight:700; font-size:14px; text-align:center; margin-top:10px; box-shadow:0 8px 18px rgba(215,42,78,.28); cursor:pointer}
.product-card .quick-add:active{transform:translateY(1px)}
.product-title{font-size:13px; margin:10px 0 6px; min-height:36px; color:#233; display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; flex:1}
.price-row{display:flex; align-items:flex-end; justify-content:space-between; gap:6px; margin-top:auto}
.price-col{display:flex; flex-direction:column}
.price-now{font-weight:800; color:#1E293B}
.price-old{font-size:12px; color:#A3AEC2; text-decoration:line-through}
.sold{font-size:11px; color:#6B778C; font-weight:600}

.floating-actions{position:absolute; right:10px; bottom:12px; display:flex; flex-direction:column; gap:8px}
.flo-btn{height:38px; width:38px; border-radius:50%; background:#fff; border:2px solid #E6EEF6; display:grid; place-items:center; color:#233; box-shadow:0 4px 12px rgba(17,24,39,.12)}
.flo-btn.alt{color:#E33652; border-color:#FFD4DB; background:#fff}

/* Bottom Tab Bar */
.tabbar{position:fixed; left:0; right:0; bottom:0; background:var(--primary); color:#fff; height:66px; display:flex; align-items:center; justify-content:center}
.tabbar::before{content:''; position:absolute; left:50%; transform:translateX(-50%); bottom:0; width:min(480px,100%); height:100%; background:var(--primary); z-index:-1}
.tabbar .tab-item{flex:1; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:#FCECEF; font-size:12px}
.tabbar .tab-item .icon{opacity:.95}
.tabbar .tab-item.center{position:relative; top:-14px}
.tabbar .tab-item.center .icon{background:#fff; color:var(--primary); height:54px; width:54px; border-radius:50%; display:grid; place-items:center; box-shadow:0 10px 20px rgba(233,73,98,.35)}
.tabbar .tab-item.center.active .label{font-weight:700}

/* Toast */
#toast{position:fixed; left:50%; transform:translateX(-50%); bottom:86px; background:#111827; color:#fff; padding:10px 14px; border-radius:12px; font-size:13px; opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; z-index:999}
#toast.show{opacity:1; transform:translateX(-50%) translateY(-4px)}

/* Utilities */
.button{cursor:pointer}
/* Icon badges for Cart count */
.icon-btn{position:relative}
.icon-btn .badge{display:none; position:absolute; top:-4px; right:-4px; min-width:16px; height:16px; padding:0 4px; border-radius:999px; background:#FF8A3D; color:#fff; font-weight:800; font-size:10px; line-height:16px; text-align:center; box-shadow:0 4px 10px rgba(255,138,61,.35)}
.tabbar .tab-item{position:relative}
.tabbar .tab-item .badge{display:none; position:absolute; top:6px; right:22%; min-width:16px; height:16px; padding:0 4px; border-radius:999px; background:#FF8A3D; color:#fff; font-weight:800; font-size:10px; line-height:16px; text-align:center; box-shadow:0 4px 10px rgba(255,138,61,.35)}
@media (min-width:520px){
  /* Center the app on larger screens */
  .tabbar::before{border-radius:16px 16px 0 0}
}

/* Cart Drawer (mobile-first) */
body.drawer-open{overflow:hidden; touch-action:none}
.cart-overlay{position:fixed; inset:0; background:rgba(15,23,42,.45); opacity:0; pointer-events:none; transition:opacity .25s ease; z-index:1000}
.cart-drawer{position:fixed; top:0; right:0; height:100%; width:min(92vw,420px); max-width:420px; background:#fff; box-shadow: -8px 0 24px rgba(2,8,20,.20); transform:translateX(100%); transition:transform .30s ease; z-index:1001; display:flex; flex-direction:column}
.cart-head{display:flex; align-items:center; justify-content:space-between; padding:14px 14px; border-bottom:1px solid #E6E8F0}
.cart-head h2{margin:0; font-size:16px; font-weight:700; color:#0F172A}
.cart-close{height:32px; width:32px; border-radius:50%; border:1px solid #E6E8F0; background:#fff; display:grid; place-items:center}
.cart-list{flex:1; overflow:auto; padding:10px 12px}
.cart-empty{padding:22px 12px; text-align:center; color:#64748B; font-size:14px}
.cart-item{display:grid; grid-template-columns:56px 1fr auto; gap:10px; align-items:flex-start; padding:10px 6px; border-bottom:1px solid #F1F5F9}
.cart-item .thumb{width:56px; height:56px; object-fit:cover; border-radius:8px; background:#F2F4F7; border:1px solid #E6E8F0}
.cart-item .title{font-weight:700; font-size:14px; color:#0F172A; margin-bottom:4px}
.cart-item .price{font-weight:600; font-size:13px; color:#111827}
.cart-item .line-total{font-weight:800; color:#0F172A; white-space:nowrap; align-self:center}
.cart-item .controls{display:flex; align-items:center; gap:10px; margin-top:6px}
.cart-item .step{width:28px; height:28px; border:1px solid #E6E8F0; background:#F8FAFC; border-radius:6px; font-weight:800}
.cart-item .qty{min-width:18px; text-align:center; font-weight:700}
.cart-item .remove{background:none; border:0; color:#ef4444; font-size:12px}
.cart-foot{border-top:1px solid #E6E8F0; padding:10px 12px; background:#fff}
.cart-foot .row{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; font-size:14px}
.cart-checkout{width:100%; height:46px; border-radius:4px; color:#fff; font-weight:800; font-size:15px; margin-bottom:8px; cursor:pointer}
.cart-checkout.cash-delivery{
  background: linear-gradient(135deg, #e9d200, #ecc900); 
  box-shadow:0 10px 20px rgba(40,167,69,.22); 
  border: 2px solid #d4b800;
  transition: all 0.3s ease;
}
.cart-checkout.online-pay{
  background: linear-gradient(135deg, #DD1949, #B91538); 
  box-shadow:0 10px 20px rgba(221,25,73,.22); 
  border: 2px solid #B91538;
  margin-bottom:0;
  transition: all 0.3s ease;
}
.cart-checkout[disabled]{opacity:.6; cursor:not-allowed; box-shadow:none}

/* Open state */
body.drawer-open .cart-overlay{opacity:1; pointer-events:auto}
body.drawer-open .cart-drawer{transform:translateX(0)}

@media (min-width:992px){
  .cart-drawer{width:min(560px,40vw); box-shadow:-16px 0 40px rgba(2,8,20,.18); border-left:1px solid #E6E8F0}
  .cart-head{padding:16px 18px}
  .cart-head h2{font-size:18px}
  .cart-list{padding:14px 16px}
  .cart-item{grid-template-columns:64px 1fr auto; gap:14px; padding:12px 8px}
  .cart-item .thumb{width:64px; height:64px}
  .cart-item .title{font-size:15px}
  .cart-item .line-total{font-size:15px}
  .cart-foot{box-shadow:0 -8px 16px rgba(2,8,20,.06); padding:12px 16px}
  .cart-checkout{height:48px; font-size:16px; border-radius:4px}
}

@keyframes shake {
  0%, 50%, 100% { transform: translateX(0); }
  10% { transform: translateX(-2px) rotate(-1deg); }
  20% { transform: translateX(2px) rotate(1deg); }
  30% { transform: translateX(-1px) rotate(-0.5deg); }
  40% { transform: translateX(1px) rotate(0.5deg); }
}

@keyframes pulse {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 10px 20px rgba(0,123,255,.22);
  }
  50% { 
    transform: scale(1.08); 
    box-shadow: 0 15px 30px rgba(0,123,255,.4);
  }
}

@keyframes bounce {
  0%, 100% { 
    transform: translateY(0) scale(1); 
    box-shadow: 0 10px 20px rgba(40,167,69,.22);
  }
  25% { 
    transform: translateY(-10px) scale(1.03); 
    box-shadow: 0 20px 35px rgba(40,167,69,.35);
  }
  50% { 
    transform: translateY(-5px) scale(1.05); 
    box-shadow: 0 25px 40px rgba(40,167,69,.4);
  }
  75% { 
    transform: translateY(-2px) scale(1.02); 
    box-shadow: 0 15px 25px rgba(40,167,69,.3);
  }
}
