:root{
  --bg:#f7fbff; --card:#fff; --fg:#0b1220; --muted:#5b6573;
  --brand:#38bdf8; --brand-dark:#0284c7; --brand-fg:#fff;
  --border:#bae6fd;
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--fg);line-height:1.5}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

/* Layout */
.container{max-width:1200px;margin:0 auto;padding:0 16px}
header.site{background:var(--card);border-bottom:2px solid var(--border);padding:14px 0;position:sticky;top:0;z-index:50}
header.site .row{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
header.site .logo{font-weight:800;font-size:20px;color:var(--brand-dark)}
header.site nav a{margin:0 10px;font-size:14px;color:var(--fg)}
header.site nav a:hover{color:var(--brand-dark)}

footer.site{background:#0b1220;color:#cbd5e1;padding:30px 0;margin-top:40px;font-size:13px;text-align:center}

/* Hero */
.hero{background:var(--brand);color:var(--brand-fg);padding:36px 0;text-align:center}
.hero h1{font-size:28px;margin-bottom:8px}
.hero p{opacity:.9;font-size:13px;margin-bottom:18px}
.hero form{display:flex;max-width:600px;margin:0 auto;background:#fff;border-radius:999px;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,.15)}
.hero input{flex:1;border:0;padding:14px 18px;font-size:14px;outline:0;color:var(--fg)}
.hero button{background:#fff;color:var(--brand-dark);border:0;padding:0 18px;cursor:pointer;font-weight:600}

/* Sections */
main{padding:32px 0}
.section{margin-bottom:40px}
.section-title{font-size:20px;font-weight:700;margin-bottom:14px;border-left:4px solid var(--brand);padding-left:10px}
.grid{display:grid;gap:14px}
.grid-products{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
.grid-blog{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px}

/* Product card */
.card{background:var(--card);border:2px solid var(--border);border-radius:8px;padding:12px;display:flex;flex-direction:column;position:relative}
.badge{position:absolute;top:8px;left:8px;background:#dc2626;color:#fff;font-size:10px;font-weight:700;padding:2px 8px;border-radius:4px;z-index:2}
.card .img{aspect-ratio:1;background:#f1f5f9;border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center;margin-bottom:10px}
.card .img img{width:100%;height:100%;object-fit:contain;padding:8px}
.card h3{font-size:12px;line-height:1.4;min-height:48px;color:#334155;margin-bottom:6px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.card .price{font-size:14px;font-weight:700;margin-bottom:10px;min-height:20px}
.card .price small{color:var(--muted);font-weight:400;text-decoration:line-through;margin-left:6px;font-size:11px}
.btn{display:inline-block;background:var(--brand);color:var(--brand-fg);font-size:13px;font-weight:600;padding:8px 12px;border-radius:6px;text-align:center;border:0;cursor:pointer}
.btn:hover{background:var(--brand-dark)}
.btn-block{display:block;width:100%}

/* Blog card */
.blog-card{background:var(--card);border:2px solid var(--border);border-radius:8px;overflow:hidden}
.blog-card .img{aspect-ratio:16/9;background:#f1f5f9;overflow:hidden}
.blog-card .img img{width:100%;height:100%;object-fit:cover}
.blog-card .body{padding:14px}
.blog-card h3{font-size:16px;font-weight:700;margin-bottom:6px;line-height:1.3}
.blog-card .date{font-size:11px;color:var(--muted);margin-bottom:6px}
.blog-card p{font-size:13px;color:var(--muted)}

/* Product page */
.product-top{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin-bottom:30px}
.product-top .img{background:#f1f5f9;border-radius:8px;aspect-ratio:1;display:flex;align-items:center;justify-content:center;overflow:hidden}
.product-top .img img{max-width:90%;max-height:90%;object-fit:contain;transition:transform .3s}
.product-top .img:hover img{transform:scale(1.6)}
.product-top h1{font-size:24px;margin-bottom:10px}
.product-top .prices{display:flex;align-items:baseline;gap:10px;margin-bottom:14px}
.product-top .prices .old{text-decoration:line-through;color:var(--muted);font-size:16px}
.product-top .prices .new{font-size:24px;font-weight:700;color:var(--brand-dark)}
.product-top p.desc{font-size:14px;color:#334155;margin-bottom:14px}
.qty{display:inline-flex;align-items:center;border:2px solid var(--border);border-radius:6px;margin-right:12px}
.qty button{background:#fff;border:0;padding:8px 12px;cursor:pointer}
.qty span{padding:0 12px;font-weight:600}
.specs{width:100%;border-collapse:collapse;font-size:14px;margin-top:14px}
.specs th,.specs td{border:1px solid #e2e8f0;padding:10px;text-align:left}
.specs th{background:#f1f5f9}
.section h2{font-size:18px;font-weight:700;margin-bottom:10px}
ul.bullets{padding-left:20px;font-size:14px;color:#334155}
ul.bullets li{margin-bottom:4px}

/* Breadcrumb */
.crumbs{font-size:12px;color:var(--muted);padding:14px 0}
.crumbs a:hover{color:var(--brand-dark)}

/* Article */
.article h1{font-size:30px;margin-bottom:8px}
.article .meta{font-size:12px;color:var(--muted);margin-bottom:18px}
.article .cover{aspect-ratio:16/9;border-radius:8px;overflow:hidden;background:#f1f5f9;margin-bottom:20px}
.article .cover img{width:100%;height:100%;object-fit:cover}
.article p{margin-bottom:14px;font-size:15px;color:#1f2937}
.article h2{font-size:22px;font-weight:700;margin:22px 0 10px}

/* Ad slot */
.ad-slot{display:flex;justify-content:center;background:var(--bg);padding:14px 16px;margin:18px 0}
.ad-slot ins{display:block;width:100%;max-width:1200px;min-height:90px}

/* Form */
.form input,.form textarea{width:100%;padding:10px;border:1px solid var(--border);border-radius:6px;margin-bottom:12px;font-family:inherit}

@media(max-width:768px){
  .product-top{grid-template-columns:1fr}
  header.site nav a{margin:0 6px;font-size:13px}
  .hero h1{font-size:22px}
}
