:root{
--bg:#202124;
--surface:#171717;
--surface-2:#111111;
--text:#f1f3f4;
--muted:#bdc1c6;
--accent:#c62828;
--accent-strong:#a61e1e;
--danger:#c94a4a;
--header-h:86px;
}

*{margin:0;padding:0;box-sizing:border-box;font-family:"Segoe UI",Tahoma,sans-serif}
body{background:var(--bg);color:var(--text);min-height:100vh}

header{
background:#000;
padding:15px 60px;
display:flex;
justify-content:space-between;
align-items:center;
position:fixed;
width:100%;
top:0;
z-index:1000;
gap:18px;
}

.logo img{height:auto;max-height:70px;width:auto;display:block;max-width:200px}

nav ul{display:flex;list-style:none;gap:30px;flex-wrap:wrap;justify-content:flex-end}
nav a{color:#bbb;text-decoration:none;font-weight:700;transition:0.3s}
nav a:hover{color:#fff}

main{padding:calc(var(--header-h) + 22px) 0 34px;min-height:calc(100vh - 70px)}

.produtos-wrap{width:min(1200px,92%);margin:0 auto}

.topbar{
display:flex;
justify-content:space-between;
align-items:flex-start;
gap:18px;
margin-bottom:22px;
}

.intro h1{font-size:clamp(1.9rem,3.6vw,2.6rem);margin-bottom:8px;color:var(--text)}
.intro p{color:var(--muted);line-height:1.5;max-width:70ch}

.new-product-btn{
background:var(--accent);
color:#fff;
border:none;
border-radius:10px;
padding:14px 20px;
font-weight:800;
cursor:pointer;
white-space:nowrap;
box-shadow:0 12px 28px rgba(198,40,40,0.18);
transition:transform 0.2s ease, background 0.2s ease;
}

.new-product-btn:hover{background:var(--accent-strong);transform:translateY(-1px)}

.grid{display:grid;grid-template-columns:repeat(auto-fill,260px);gap:20px;justify-content:flex-start}

.produto{
background:var(--surface);
padding:16px;
border-radius:14px;
box-shadow:0 10px 24px rgba(0,0,0,0.28);
display:flex;
flex-direction:column;
width:260px;
height:520px;
gap:10px;
border:1px solid rgba(255,255,255,0.04);
overflow:hidden;
cursor:pointer;
transition:transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.produto:hover{
transform:translateY(-2px);
border-color:rgba(198,40,40,0.22);
box-shadow:0 14px 30px rgba(0,0,0,0.34);
}

.produto .img-wrap{
position:relative;
height:220px;
overflow:hidden;
border-radius:10px;
background:#0e0e0e;
flex:0 0 auto;
display:flex;
align-items:center;
justify-content:center;
}

.produto img{width:100%;height:100%;object-fit:contain;display:block;padding:8px}
.produto h3{color:var(--text);font-size:1.15rem;line-height:1.25}
.produto p{line-height:1.5;color:var(--muted)}
.preco{color:var(--accent);font-weight:800;font-size:1.08rem}
.info{display:grid;gap:8px;flex:1;min-height:0;overflow:hidden}
.produto-desc{
display:-webkit-box;
-webkit-box-orient:vertical;
overflow:hidden;
}
.produto-desc{-webkit-line-clamp:4}

.produto-hint{
margin-top:auto;
font-size:0.88rem;
font-weight:700;
color:rgba(198,40,40,0.95);
}

.remove-btn{
align-self:flex-start;
background:transparent;
color:#ffb4b4;
border:1px solid rgba(201,74,74,0.45);
border-radius:999px;
padding:9px 14px;
cursor:pointer;
font-weight:700;
transition:0.2s ease;
}

.remove-btn:hover{background:rgba(201,74,74,0.12);border-color:rgba(201,74,74,0.75)}

.empty-state{
grid-column:1 / -1;
text-align:center;
padding:54px 18px;
background:var(--surface-2);
border-radius:16px;
border:1px dashed rgba(255,255,255,0.14);
color:var(--muted);
}

.modal-backdrop{
position:fixed;
inset:0;
background:rgba(0,0,0,0.7);
display:none;
align-items:center;
justify-content:center;
padding:18px;
z-index:2000;
}

.modal-backdrop.open{display:flex}

.modal{
width:min(640px,100%);
background:#141414;
border-radius:18px;
border:1px solid rgba(255,255,255,0.08);
box-shadow:0 22px 60px rgba(0,0,0,0.45);
padding:22px;
}

.details-modal{
width:min(920px,100%);
background:#141414;
border-radius:18px;
border:1px solid rgba(255,255,255,0.08);
box-shadow:0 22px 60px rgba(0,0,0,0.45);
padding:22px;
max-height:90vh;
overflow:auto;
}

.details-layout{
display:grid;
grid-template-columns:minmax(280px,360px) minmax(0,1fr);
gap:22px;
align-items:start;
}

.details-image{
background:#0e0e0e;
border-radius:14px;
padding:16px;
border:1px solid rgba(255,255,255,0.05);
}

.details-image img{
width:100%;
height:320px;
object-fit:contain;
display:block;
}

.details-content{display:grid;gap:14px}
.details-price{font-size:1.35rem;font-weight:900;color:var(--accent)}
.details-description,.details-info{color:var(--muted);line-height:1.7;white-space:pre-wrap}

.details-section{
background:#1a1a1a;
border:1px solid rgba(255,255,255,0.06);
border-radius:12px;
padding:16px;
}

.details-section h3{font-size:1rem;margin-bottom:8px;color:#fff}
.details-actions{
display:flex;
justify-content:space-between;
gap:12px;
margin-top:18px;
flex-wrap:wrap;
}

.details-actions .buy-btn{
display:inline-flex;
align-items:center;
justify-content:center;
background:var(--accent);
color:#171717;
text-decoration:none;
border-radius:10px;
padding:12px 18px;
font-weight:900;
transition:background 0.2s ease, transform 0.2s ease;
}

.details-actions .buy-btn:hover{background:var(--accent-strong);transform:translateY(-1px)}

.details-actions .secondary-btn{margin-left:auto}

.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.modal-head h2{font-size:1.5rem;margin-bottom:6px}
.modal-head p{color:var(--muted);line-height:1.5}

.close-btn{
background:transparent;
border:none;
color:#fff;
font-size:1.4rem;
cursor:pointer;
line-height:1;
padding:4px 8px;
}

.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.field{display:grid;gap:8px}
.field.full{grid-column:1 / -1}
.field label{font-weight:700;color:#e7e7e7}
.field input,.field textarea{
width:100%;
border-radius:10px;
border:1px solid rgba(255,255,255,0.12);
background:#1e1e1e;
color:var(--text);
padding:12px 14px;
outline:none;
}

.field textarea{min-height:110px;resize:vertical}
.field input:focus,.field textarea:focus{border-color:rgba(198,40,40,0.8);box-shadow:0 0 0 3px rgba(198,40,40,0.12)}

.form-actions{
display:flex;
justify-content:flex-end;
gap:12px;
margin-top:18px;
flex-wrap:wrap;
}

.secondary-btn,
.primary-btn{
border:none;
border-radius:10px;
padding:12px 18px;
font-weight:800;
cursor:pointer;
}

.secondary-btn{background:#2a2a2a;color:#fff}
.primary-btn{background:var(--accent);color:#fff}
.primary-btn:hover{background:var(--accent-strong)}

.helper{font-size:0.92rem;color:var(--muted)}

footer{background:#000;color:#aaa;text-align:center;padding:22px}

@media (max-width:900px){
header{padding:12px 20px}
nav ul{gap:15px}
.topbar{flex-direction:column;align-items:stretch}
.new-product-btn{width:100%}
}

@media (max-width:640px){
main{padding-top:96px}
.form-grid{grid-template-columns:1fr}
.modal{padding:18px}
.details-layout{grid-template-columns:1fr}
.details-image img{height:260px}
.details-actions{flex-direction:column}
.details-actions .buy-btn,.details-actions .secondary-btn{width:100%;margin-left:0}
}