:root{
  --primary: #e60000; /* Vodacom red */
  --dark:#222;
  --muted:#6b6b6b;
  --bg:#f6f7fb;
  --card:#ffffff;
  --radius:12px;
  --shadow: 0 6px 18px rgba(20,20,30,0.08);
}
*{box-sizing:border-box}
html,body{height:100%;}
body{
  font-family: 'Poppins',system-ui,Segoe UI,Roboto,Arial;
  margin:0; background:var(--bg); color:var(--dark); -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale; line-height:1.4;
}

/* Header */
header.appbar{
  position:sticky; top:0; z-index:40; background:linear-gradient(180deg, rgba(230,0,0,0.98), rgba(230,0,0,0.95));
  color: #fff; display:flex; align-items:center; gap:1rem; padding:0.6rem 1rem; box-shadow:var(--shadow);
}
.logo{display:flex; align-items:center; gap:0.6rem; text-decoration:none; color:inherit}
.logo-img{height:38px; width:auto; border-radius:6px; background:none; padding:2px}
.logo h1{font-size:1.05rem; margin:0; font-weight:700}

.searchbar{flex:1; display:flex; gap:0.6rem; align-items:center}
.searchbar input[type="search"]{
  flex:1; padding:0.6rem 0.9rem; border-radius:10px; border: none; outline:none; font-size:0.95rem;
  box-shadow:inset 0 2px 6px rgba(0,0,0,0.04);
}
.searchbar select{padding:0.55rem 0.7rem; border-radius:10px; border:none; font-size:0.9rem}
.icon-actions{display:flex; gap:0.5rem; align-items:center}

.cart-btn{position:relative; background:transparent; border:none; color:inherit; cursor:pointer; padding:0.4rem 0.6rem; border-radius:10px; font-size:1.1rem}
.badge{position:absolute; top:-6px; right:-6px; background: #fff; color:var(--primary); min-width:22px; height:22px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:0.75rem; box-shadow: 0 4px 10px rgba(0,0,0,0.12)}

/* Layout */
.container{max-width:1200px; margin:1rem auto; padding:0 1rem}
.hero{display:grid; grid-template-columns: 1fr 320px; gap:1rem; align-items:start}
.hero .banner{background:linear-gradient(90deg,#fff 0,#fff 60%); border-radius:var(--radius); padding:0.6rem; box-shadow:var(--shadow); overflow:hidden}
.main-banner{height:320px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:linear-gradient(90deg,#ffefef, #fff); position:relative}
.main-banner img{max-width:100%; max-height:100%; object-fit:cover}

.side-banners{display:flex; flex-direction:column; gap:0.8rem}
.side-banners .card{background:var(--card); border-radius:10px; padding:0.6rem; height:100px; display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow)}

/* Grid */
.content{display:grid; grid-template-columns: 260px 1fr; gap:1rem; margin-top:1rem}

/* Categories */
.categories{background:var(--card); border-radius:var(--radius); padding:0.6rem; box-shadow:var(--shadow)}
.cat-title{display:flex; align-items:center; gap:0.6rem; font-weight:600; color:var(--primary)}
.cat-list{margin-top:0.6rem}
.cat-item{display:flex; align-items:center; gap:0.6rem; padding:0.55rem; border-radius:8px; cursor:pointer; color:var(--dark); font-size:0.95rem}
.cat-item:hover{background:#f2f4f8}
.cat-item .ico{width:34px; height:34px; border-radius:8px; background:linear-gradient(180deg,#fff,#fafafa); display:inline-flex; align-items:center; justify-content:center; box-shadow:inset 0 1px 0 rgba(255,255,255,0.6)}

/* Products list */
.controls{display:flex; gap:0.6rem; align-items:center; justify-content:space-between; margin-bottom:0.6rem}
.controls .left{display:flex; gap:0.6rem}
.grid{display:grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap:1rem}

.card-product{background:var(--card); border-radius:12px; padding:0.8rem; box-shadow:var(--shadow); display:flex; flex-direction:column; gap:0.6rem; transition:transform .18s ease, box-shadow .18s ease}
.card-product:hover{transform:translateY(-6px)}
.thumb{height:150px; border-radius:10px; overflow:hidden; display:flex; align-items:center; justify-content:center; background:linear-gradient(180deg,#f9f9fb,#fff)}
.thumb img{max-width:100%; max-height:100%; object-fit:contain}
.meta{display:flex; justify-content:space-between; align-items:center}
.title{font-weight:600; font-size:0.95rem}
.price{font-weight:700; color:var(--primary)}
.card-product button{padding:0.6rem 0.7rem; border-radius:10px; border:none; cursor:pointer; background:linear-gradient(90deg,var(--primary), #ff3b3b); color:#fff; font-weight:600}

.small{font-size:0.85rem; color:var(--muted)}

/* Sticky cart drawer */
.cart-drawer{position:fixed; right:18px; bottom:18px; width:360px; max-width:92%; background:var(--card); border-radius:14px; box-shadow:0 20px 50px rgba(20,20,30,0.18); overflow:hidden; transform:translateY(0); transition:transform .25s ease, opacity .2s; z-index:80}
.cart-drawer.collapsed{transform:translateY(60px); opacity:0; pointer-events:none}
.cart-drawer header{display:flex; align-items:center; justify-content:space-between; padding:0.8rem 1rem; border-bottom:1px solid #f2f2f2}
.cart-items{max-height:260px; overflow:auto; padding:0.8rem 1rem; display:flex; flex-direction:column; gap:0.6rem}
.cart-line{display:flex; gap:0.6rem; align-items:center; justify-content:space-between}
.cart-line .left{display:flex; gap:0.6rem; align-items:center}
.cart-line img{width:56px; height:46px; object-fit:cover; border-radius:8px}
.cart-footer{padding:0.8rem 1rem; border-top:1px solid #f2f2f2; display:flex; justify-content:space-between; align-items:center}
.btn-checkout{background:var(--primary); color:#fff; border:none; padding:0.6rem 0.9rem; border-radius:10px; font-weight:700}

/* Buttons inside cart qty */
.cart-line button{background:#f3f3f3; border:none; padding:6px 8px; border-radius:6px; cursor:pointer}

/* Notifications */
.toast{position:fixed; left:50%; transform:translateX(-50%); bottom:92px; background:var(--primary); color:#fff; padding:0.6rem 1rem; border-radius:999px; box-shadow:0 8px 30px rgba(0,0,0,0.12); display:flex; align-items:center; gap:0.6rem; z-index:90; opacity:0; pointer-events:none; transition:all .25s}
.toast.show{opacity:1; bottom:110px; pointer-events:auto}

/* Footer */
footer.sitefoot{margin-top:2rem; padding:1.2rem; text-align:center; color:var(--muted)}

/* Responsive adjustments */
@media (max-width:980px){
  .hero{grid-template-columns:1fr}
  .main-banner{height:220px}
  .content{grid-template-columns: 1fr}
  .categories{order:2}
}

@media (max-width:560px){
  header.appbar{padding:0.5rem; gap:0.4rem}
  .logo h1{font-size:0.95rem}
  .thumb{height:120px}
  .cart-drawer{right:12px; left:12px; width:auto}
}
