/* AppFood Frontend CSS */
:root {
  --af-primary: #00AA5B;
  --af-primary-dark: #008A49;
  --af-primary-light: #E6F7EF;
  --af-text: #111;
  --af-muted: #666;
  --af-bg: #fff;
  --af-bg2: #f7f7f7;
  --af-border: #eee;
  --af-radius: 12px;
}
* { box-sizing:border-box; }
.af-app { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; max-width:480px; margin:0 auto; background:var(--af-bg); min-height:100vh; position:relative; }

/* Header */
.af-app-header { background:var(--af-primary); padding:14px 16px; color:#fff; }
.af-app-header-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.af-location { font-size:12px; opacity:.8; }
.af-location strong { display:block; font-size:14px; opacity:1; }
.af-header-icons { display:flex; gap:14px; align-items:center; font-size:22px; cursor:pointer; }
.af-cart-icon { position:relative; }
.af-cart-badge { position:absolute; top:-6px; right:-6px; background:#ff4444; color:#fff; font-size:9px; width:16px; height:16px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; }

/* Search */
.af-search { background:#fff; border-radius:10px; display:flex; align-items:center; gap:8px; padding:10px 12px; margin-bottom:2px; }
.af-search input { border:none; outline:none; font-size:14px; flex:1; color:var(--af-text); }
.af-search-icon { color:var(--af-primary); font-size:16px; }

/* Banner */
.af-banner { background:var(--af-primary); padding:12px 16px 20px; }
.af-banner-card { background:rgba(0,0,0,0.15); border-radius:var(--af-radius); padding:18px; display:flex; justify-content:space-between; align-items:center; }
.af-banner-title { font-size:16px; font-weight:700; color:#fff; line-height:1.3; }
.af-banner-sub { font-size:12px; color:rgba(255,255,255,.75); margin-top:4px; }
.af-banner-btn { background:#fff; color:var(--af-primary); font-size:11px; font-weight:600; padding:6px 12px; border-radius:20px; display:inline-block; margin-top:10px; cursor:pointer; }
.af-banner-emoji { font-size:52px; }
.af-dots { display:flex; gap:5px; justify-content:center; margin-top:8px; }
.af-dot { width:6px; height:6px; border-radius:3px; background:rgba(255,255,255,.4); }
.af-dot.active { width:18px; background:#fff; }

/* Content area */
.af-content { padding:0 0 90px; background:var(--af-bg); }

/* Section */
.af-section { padding:16px 16px 0; }
.af-section-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.af-section-title { font-size:15px; font-weight:600; color:var(--af-text); }
.af-see-all { font-size:12px; color:var(--af-primary); cursor:pointer; text-decoration:none; }

/* Categories */
.af-cats { display:flex; gap:10px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.af-cats::-webkit-scrollbar { display:none; }
.af-cat { flex-shrink:0; text-align:center; cursor:pointer; }
.af-cat-icon { width:56px; height:56px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:26px; margin-bottom:5px; background:var(--af-bg2); border:2px solid transparent; transition:.2s; }
.af-cat.active .af-cat-icon { background:var(--af-primary); border-color:var(--af-primary); }
.af-cat-name { font-size:10px; color:var(--af-muted); white-space:nowrap; }
.af-cat.active .af-cat-name { color:var(--af-primary); font-weight:600; }

/* Product cards horizontal */
.af-products-h { display:flex; gap:12px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.af-products-h::-webkit-scrollbar { display:none; }
.af-product-card-h { flex-shrink:0; width:148px; background:var(--af-bg); border:1px solid var(--af-border); border-radius:var(--af-radius); overflow:hidden; }
.af-product-img-h { height:96px; display:flex; align-items:center; justify-content:center; font-size:44px; }
.af-product-img-h img { width:100%; height:100%; object-fit:cover; }
.af-product-body-h { padding:8px 10px; }
.af-product-tag { font-size:9px; padding:2px 6px; border-radius:4px; display:inline-block; margin-bottom:4px; }
.af-product-name-h { font-size:12px; font-weight:600; color:var(--af-text); margin:0 0 2px; line-height:1.3; }
.af-product-price-h { font-size:12px; font-weight:700; color:var(--af-primary); }
.af-add-btn-h { width:100%; margin-top:6px; background:var(--af-primary); color:#fff; border:none; border-radius:7px; padding:6px; font-size:11px; font-weight:600; cursor:pointer; }

/* Product list */
.af-products-list { display:flex; flex-direction:column; gap:10px; padding:0 16px; }
.af-product-card-v { display:flex; gap:12px; background:var(--af-bg); border:1px solid var(--af-border); border-radius:var(--af-radius); padding:12px; align-items:center; cursor:pointer; transition:.2s; }
.af-product-card-v:hover { border-color:var(--af-primary); }
.af-product-img-v { width:64px; height:64px; border-radius:10px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:30px; overflow:hidden; }
.af-product-img-v img { width:100%; height:100%; object-fit:cover; }
.af-product-info { flex:1; }
.af-product-name-v { font-size:13px; font-weight:600; color:var(--af-text); margin:0 0 3px; }
.af-product-desc { font-size:11px; color:var(--af-muted); margin:0 0 4px; }
.af-product-meta { display:flex; align-items:center; gap:6px; }
.af-product-price-v { font-size:13px; font-weight:700; color:var(--af-primary); }
.af-rating { font-size:10px; color:var(--af-muted); }
.af-add-btn-v { width:30px; height:30px; background:var(--af-primary); border:none; border-radius:8px; color:#fff; font-size:18px; cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; }

/* Bottom nav */
.af-bottom-nav { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px; background:var(--af-bg); border-top:1px solid var(--af-border); display:flex; justify-content:space-around; padding:10px 0 16px; z-index:100; }
.af-nav-item { text-align:center; cursor:pointer; flex:1; }
.af-nav-icon { font-size:22px; color:var(--af-muted); }
.af-nav-label { font-size:9px; color:var(--af-muted); margin-top:2px; display:block; }
.af-nav-item.active .af-nav-icon,.af-nav-item.active .af-nav-label { color:var(--af-primary); }

/* Cart drawer */
.af-cart-overlay { position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:200; display:none; }
.af-cart-drawer { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px; background:#fff; border-radius:20px 20px 0 0; z-index:201; padding:20px 16px 32px; max-height:80vh; overflow-y:auto; display:none; }
.af-cart-handle { width:40px; height:4px; background:#ddd; border-radius:2px; margin:0 auto 16px; }
.af-cart-title { font-size:17px; font-weight:700; margin-bottom:16px; }
.af-cart-items { display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.af-cart-item { display:flex; align-items:center; gap:10px; }
.af-cart-item-name { flex:1; font-size:13px; }
.af-cart-item-qty { display:flex; align-items:center; gap:8px; }
.af-qty-btn { width:26px; height:26px; border:1px solid var(--af-border); border-radius:6px; background:#fff; font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.af-cart-item-price { font-size:13px; font-weight:700; color:var(--af-primary); min-width:60px; text-align:right; }
.af-cart-summary { border-top:1px solid var(--af-border); padding-top:14px; }
.af-cart-row { display:flex; justify-content:space-between; font-size:13px; margin-bottom:6px; color:var(--af-muted); }
.af-cart-total { font-size:16px; font-weight:700; color:var(--af-text); }
.af-checkout-btn { width:100%; background:var(--af-primary); color:#fff; border:none; border-radius:12px; padding:14px; font-size:15px; font-weight:700; cursor:pointer; margin-top:14px; }
.af-empty-cart { text-align:center; color:var(--af-muted); padding:30px 0; font-size:14px; }

/* Checkout form */
.af-form-group { margin-bottom:14px; }
.af-form-group label { display:block; font-size:12px; font-weight:600; color:var(--af-muted); margin-bottom:4px; }
.af-form-group input, .af-form-group select, .af-form-group textarea { width:100%; padding:10px 12px; border:1px solid var(--af-border); border-radius:9px; font-size:14px; outline:none; }
.af-form-group input:focus,.af-form-group select:focus,.af-form-group textarea:focus { border-color:var(--af-primary); }

/* Order status */
.af-status-track { padding:20px 16px; }
.af-track-step { display:flex; align-items:flex-start; gap:12px; margin-bottom:16px; }
.af-track-icon { width:36px; height:36px; border-radius:50%; background:var(--af-bg2); display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
.af-track-icon.done { background:var(--af-primary-light); }
.af-track-icon.active { background:var(--af-primary); }
.af-track-line { width:2px; height:24px; background:var(--af-border); margin:2px 0 0 17px; }
.af-track-line.done { background:var(--af-primary); }

/* Success screen */
.af-success { text-align:center; padding:40px 20px; }
.af-success-icon { font-size:64px; margin-bottom:16px; }
.af-success h2 { font-size:20px; font-weight:700; margin:0 0 8px; }
.af-success p { color:var(--af-muted); font-size:14px; }
.af-success .af-order-num { font-size:22px; font-weight:700; color:var(--af-primary); margin:12px 0; }
.af-wa-btn { display:inline-flex; align-items:center; gap:8px; background:#25d366; color:#fff; border:none; padding:12px 24px; border-radius:10px; font-size:14px; font-weight:600; cursor:pointer; text-decoration:none; margin-top:10px; }

/* Responsive */
@media(max-width:480px){ .af-app { max-width:100%; } }
