:root{
  --navy:#131921;
  --navy-light:#232f3e;
  --orange:#ff9900;
  --orange-dark:#e88a00;
  --bg:#eaeded;
  --text:#0f1111;
  --muted:#565959;
  --price-red:#B12704;
  --star:#ffa41c;
  --radius:4px;
}
*{box-sizing:border-box;}
body{
  margin:0;
  font-family:-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}

/* ---------- Header ---------- */
.site-header{background:var(--navy);color:#fff;}
.nav-inner{max-width:1400px;margin:0 auto;display:flex;align-items:center;gap:20px;padding:0 16px;}
.nav-top .nav-inner{height:64px;}
.logo{font-size:22px;font-weight:700;color:#fff;white-space:nowrap;}
.logo-dot{color:var(--orange);font-weight:400;}
.search-bar{flex:1;display:flex;max-width:700px;}
.search-bar input{flex:1;border:none;padding:10px 12px;font-size:15px;border-radius:var(--radius) 0 0 var(--radius);}
.search-bar button{background:var(--orange);border:none;padding:0 16px;border-radius:0 var(--radius) var(--radius) 0;cursor:pointer;font-size:16px;}
.search-bar button:hover{background:var(--orange-dark);}
.nav-right{white-space:nowrap;font-size:13px;color:#ccc;}
.nav-categories{background:var(--navy-light);}
.nav-categories .nav-inner{height:40px;gap:18px;overflow-x:auto;}
.nav-categories a{font-size:13px;color:#fff;white-space:nowrap;padding:4px 0;}
.nav-categories a:hover{color:var(--orange);}
.cat-all{font-weight:700;}

/* ---------- Main layout ---------- */
.site-main{max-width:1400px;margin:0 auto;padding:20px 16px 60px;}

/* ---------- Hero ---------- */
.hero{background:linear-gradient(135deg,var(--navy),var(--navy-light));color:#fff;border-radius:8px;padding:36px 28px;margin-bottom:24px;}
.hero h1{margin:0 0 8px;font-size:28px;}
.hero p{margin:0;color:#cfd6dd;font-size:15px;}

/* ---------- Product grid ---------- */
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;}
.product-card{background:#fff;border-radius:var(--radius);padding:14px;display:flex;flex-direction:column;transition:box-shadow .15s,transform .15s;cursor:pointer;}
.product-card:hover{box-shadow:0 4px 14px rgba(0,0,0,.18);transform:translateY(-2px);}
.product-card .img-wrap{height:180px;display:flex;align-items:center;justify-content:center;margin-bottom:10px;overflow:hidden;}
.product-card .img-wrap img{max-height:180px;object-fit:contain;}
.product-card .p-name{font-size:14px;line-height:1.3;color:var(--text);margin-bottom:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:36px;}
.product-card:hover .p-name{color:var(--price-red);}
.product-card .p-price{font-size:19px;font-weight:700;color:var(--text);margin:4px 0;}
.product-card .p-price .currency-note{font-size:12px;color:var(--muted);font-weight:400;}
.product-card .source-tag{font-size:11px;background:var(--bg);color:var(--muted);padding:2px 8px;border-radius:10px;display:inline-block;margin-bottom:6px;width:fit-content;}
.buy-btn{margin-top:auto;background:var(--orange);color:#111;border:none;padding:9px 12px;border-radius:20px;font-weight:600;font-size:13px;text-align:center;cursor:pointer;display:block;}
.product-card:hover .buy-btn{background:var(--orange-dark);}

/* Stars */
.stars{color:var(--star);font-size:14px;letter-spacing:1px;}
.star-half{opacity:.5;}
.star-empty{color:#d9d9d9;}
.rating-row{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-bottom:4px;}

/* ---------- Section headings ---------- */
.section-title{font-size:20px;margin:28px 0 14px;font-weight:700;}

/* ---------- Pagination ---------- */
.pagination{display:flex;gap:6px;justify-content:center;margin-top:28px;flex-wrap:wrap;}
.pagination a,.pagination span{padding:8px 13px;background:#fff;border-radius:var(--radius);font-size:14px;border:1px solid #ddd;}
.pagination .active{background:var(--navy);color:#fff;border-color:var(--navy);}

/* ---------- Product detail page ---------- */
.product-detail{display:grid;grid-template-columns:420px 1fr;gap:32px;background:#fff;padding:28px;border-radius:8px;}
.product-detail .img-wrap{display:flex;align-items:center;justify-content:center;min-height:380px;background:#fafafa;border-radius:8px;}
.product-detail .img-wrap img{max-height:380px;object-fit:contain;}
.product-detail h1{font-size:24px;margin:0 0 10px;}
.product-detail .price-block{font-size:30px;font-weight:700;color:var(--price-red);margin:16px 0;}
.product-detail .desc{font-size:15px;line-height:1.6;color:#333;margin:16px 0;white-space:pre-line;}
.product-detail .buy-btn-lg{display:inline-block;background:var(--orange);color:#111;padding:14px 30px;border-radius:24px;font-weight:700;font-size:15px;margin-top:12px;}
.product-detail .buy-btn-lg:hover{background:var(--orange-dark);}
.affiliate-note{font-size:12px;color:var(--muted);margin-top:18px;border-top:1px solid #eee;padding-top:12px;}

@media(max-width:760px){
  .product-detail{grid-template-columns:1fr;}
  .search-bar{max-width:none;}
  .nav-right{display:none;}
}

/* ---------- Footer ---------- */
.site-footer{background:var(--navy);color:#cfd6dd;margin-top:40px;}
.footer-inner{max-width:1400px;margin:0 auto;padding:24px 16px;font-size:13px;text-align:center;}
.footer-inner .disclosure{max-width:640px;margin:8px auto;color:#9aa5b1;}
.footer-inner .copyright{color:#7a8595;margin-top:8px;}

/* ---------- Empty state ---------- */
.empty-state{text-align:center;padding:60px 20px;color:var(--muted);}
