/* assets/style.css — Light theme to match provided mockup */
:root{
  --bg:#fafafa;
  --text:#111;
  --muted:#666;
  --yellow:#FFD233;
  --yellow-dark:#F5C300;
  --black:#000;
  --white:#fff;
  --red:#E53935;
  --grey:#EAEAEA;
  --border:#111;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* Header brand like "Laptop Prodigies" */
header{
  background:var(--bg);
  border-bottom:1px solid #eee;
  padding:18px 20px 6px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand .logo{
  width:42px;height:32px;border-radius:6px;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-dark));
  border:2px solid #222;
  position:relative;
}
.brand .logo:before{
  content:''; position:absolute; left:6px; right:6px; top:6px; bottom:6px;
  background:#111; border-radius:3px;
}
.brand .title{
  line-height:1;
}
.brand .title .top{
  font-weight:800; font-size:22px; letter-spacing:.5px; color:#111;
}
.brand .title .bottom{
  font-weight:900; font-size:22px; color:var(--yellow-dark);
}

/* Hide default nav to mimic mockup cleanliness */
nav{display:none}

main{max-width:480px;margin:0 auto;padding:14px 18px 80px}

/* Cardless clean layout */
h1,h2,h3,p{margin:0}
h2{font-size:20px;margin:10px 0}

/* User block */
.user-block{margin:8px 0 16px}
.user-name{font-size:22px; font-weight:800; margin:4px 0}
.user-phone{display:flex; align-items:center; gap:8px; color:#222; font-weight:600}
.phone-icon{width:18px;height:18px;border:2px solid #111;border-radius:4px;display:inline-block;position:relative}
.phone-icon:before{content:'';position:absolute;left:2px;right:2px;top:2px;bottom:8px;border-radius:2px;background:#111}
.phone-icon:after{content:'';position:absolute;left:6px;right:6px;height:4px;bottom:2px;border-radius:2px;background:#111}

/* Segmented control (New Order / My Orders) */
.segmented{
  display:flex; gap:0; border-radius:14px; overflow:hidden;
  background:#e9e9e9; border:1px solid #d3d3d3; margin:8px 0 18px; width:100%;
}
.segmented a{
  flex:1; text-align:center; padding:12px 10px; text-decoration:none;
  color:#111; font-weight:800; font-size:15px;
}
.segmented a.active{
  background:var(--yellow); border-right:1px solid #d3b800; border-left:1px solid #d3b800;
}

/* Big pill buttons */
.btn-pill{
  display:block; width:100%;
  margin:14px 0;
  padding:22px 18px;
  border-radius:20px;
  font-weight:900; font-size:20px; letter-spacing:.5px;
  text-align:center; text-decoration:none; cursor:pointer;
  border:3px solid var(--border);
  box-shadow: 0 2px 0 #111;
}
.btn-yellow{ background:var(--yellow); color:#111; }
.btn-white{ background:var(--white); color:#111; }
.btn-black{ background:#111; color:#fff; }
.btn-outline{ background:transparent; color:#111; }

/* Logout button (red pill) */
.logout{
  position:fixed; bottom:18px; right:18px; left:18px;
}
.btn-logout{
  display:block; width:160px; margin-left:auto;
  background:var(--red); color:#fff; border:0; border-radius:14px;
  text-align:center; padding:14px 16px; font-weight:800; text-decoration:none;
}

/* Generic forms */
label{display:block;margin:8px 0 6px;color:#333;font-weight:700}
input,select,textarea{
  width:100%; padding:12px; border-radius:10px; border:1px solid #d7d7d7; background:#fff; color:#111;
}
button{cursor:pointer}

.error{background:#ffe9e9;border:1px solid #ffb4b4;color:#9b1c1c;padding:10px;border-radius:10px;margin-bottom:10px}

/* Pages using tables (admin) keep prior classes minimally */
.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid #e5e7eb;padding:10px;text-align:left}
.table th{color:#4b5563}

.products .product .media{height:160px;background:#f4f4f4;border-radius:12px;overflow:hidden;display:flex;align-items:center;justify-content:center;position:relative;border:1px solid #ddd}
.products .product img{max-height:100%;max-width:100%;position:absolute;opacity:0;transition:opacity .4s}
.products .product img.active{opacity:1}


/* ---- Sales page card theme (matches order card style) ---- */
.card-edge{
  background:#fff;
  border:3px solid #111;
  border-radius:16px;
  padding:16px;
  box-shadow:0 2px 0 #111;
}
.shop{display:grid;grid-template-columns:1fr 360px;gap:20px}
@media (max-width: 880px){ .shop{grid-template-columns:1fr} .cart{position:static} }

/* Filter bar */
.filters-bar{
  background:#fff;border:3px solid #111;border-radius:16px;padding:10px 12px;margin:8px 0 14px;display:flex;gap:8px;align-items:center;box-shadow:0 2px 0 #111
}
.filters-bar input,.filters-bar select{flex:1;border:2px solid #111;border-radius:12px;padding:10px 12px;background:#fff}
.filters-bar .btn-apply{padding:12px 14px;border-radius:12px;border:2px solid #111;background:#FFD233;font-weight:800;cursor:pointer}

/* Product card */
.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.prod-card{}
.prod-card .media{height:170px;background:#f4f4f4;border:2px solid #111;border-radius:12px;overflow:hidden;display:flex;align-items:center;justify-content:center;position:relative}
.prod-card img{max-width:100%;max-height:100%;position:absolute;opacity:0;transition:opacity .4s}
.prod-card img.active{opacity:1}
.prod-card h3{margin:10px 0 6px;font-size:18px}
.prod-card .desc{color:#444;font-size:14px;margin:0 0 8px}
.prod-card .meta{display:flex;justify-content:space-between;align-items:center;margin:6px 0;font-weight:800}
.prod-card .meta .price{font-size:16px}
.prod-card .meta .stock{font-size:13px;color:#333}
.prod-card .btn-row{margin-top:10px}
.prod-card .btn-add{width:100%}

/* Cart styled like card */
.cart.card-edge h3{margin-top:0}
.cart .cart-row{display:grid;grid-template-columns:1fr 70px 90px 30px;gap:8px;align-items:center;margin-bottom:6px}
.cart .cart-row input{border:2px solid #111}
.cart .cart-total{font-weight:900;margin:10px 0}
.cart .delivery{display:flex;gap:12px;margin:8px 0}
.cart #deliveryForm input{border:2px solid #111}
.cart #placeOrderBtn{width:100%; margin-top:10px}


/* ---- Auth screens (login/register/admin) ---- */
.auth-wrap{max-width:440px;margin:26px auto 40px}
.auth-card{background:#fff;border:3px solid #111;border-radius:16px;padding:18px;box-shadow:0 2px 0 #111}
.auth-card h2{margin:6px 0 14px;font-size:22px}
.auth-card label{display:block;margin:10px 0 6px;font-weight:800;color:#111}
.auth-card input{width:100%;padding:12px;border:2px solid #111;border-radius:12px;background:#fff;color:#111}
.auth-actions{margin-top:14px}
.auth-actions .btn-submit{width:100%}
.sub-links{display:flex;justify-content:space-between;gap:10px;margin-top:10px;font-weight:800}
.sub-links a{color:#111;text-decoration:none}
.small-note{font-size:12px;color:#555;margin-top:8px}


/* ---- Global Nav + Back ---- */
.site-nav{margin:10px auto 16px; max-width:480px; display:flex; gap:10px; align-items:center}
.btn-back{
  text-decoration:none; padding:10px 12px; border-radius:12px;
  border:2px solid #111; background:#fff; color:#111; font-weight:800;
  display:inline-flex; align-items:center; gap:6px; box-shadow:0 2px 0 #111
}
.nav-links{display:flex; gap:8px; flex-wrap:wrap}
.nav-links a{
  text-decoration:none; padding:10px 12px; border-radius:12px; border:2px solid #111;
  background:#fff; color:#111; font-weight:800; box-shadow:0 2px 0 #111
}
.nav-links a.nav-yellow{ background:#FFD233; }
.nav-links a.nav-black{ background:#111; color:#fff; }
@media (max-width:520px){
  .site-nav{flex-direction:column; align-items:stretch}
  .nav-links{justify-content:space-between}
}
