:root{
  --bg:#0b0a0a;
  --panel:#0f0d0c;
  --panel2:#11100f;
  --border:#23160b;
  --text:#f4e7d0;
  --muted:#c8b79a;
  --amber1:#ffea9a;
  --amber2:#ffc34d;
  --amber3:#ff9f1a;
  --amber4:#ff7a00;
  --shadow: rgba(255,170,60,.16);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:radial-gradient(1200px 600px at 50% -200px, rgba(255,170,60,.18), transparent 60%),
             linear-gradient(180deg, #090808, #0b0a0a);
  color:var(--text);
  font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
}

a{color:inherit}
button,input,select{font:inherit;color:inherit}

.page{min-height:100%; display:flex; align-items:stretch; justify-content:center; padding:16px}

/* Modal shell */
.storeModal{
  width:min(1280px, 100%);
  margin:auto;
}
.storeShell{
  position:relative;
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent 18%),
             radial-gradient(900px 450px at 40% 0%, rgba(255,170,60,.10), transparent 60%),
             var(--panel);
  border:1px solid rgba(255,170,60,.16);
  border-radius:24px;
  box-shadow:0 18px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.35) inset;
  overflow:hidden;
  min-height:100vh;
  height:auto;
}

.storeTop{
  display:flex;
  align-items:flex-start;
  gap:16px;
  padding:18px 18px 10px;
  background:linear-gradient(180deg, rgba(0,0,0,.5), transparent);
  border-bottom:1px solid rgba(255,170,60,.14);
}

.storeTitle{
  margin:0;
  letter-spacing:.16em;
  font-weight:700;
  font-size:18px;
  opacity:.92;
  padding-top:2px;
  min-width:92px;
}

.storeControls{
  display:flex;
  gap:12px;
  align-items:flex-end;
  flex:1;
  min-width:0;
  padding-top:2px;
}

.ctrl{display:flex; flex-direction:column; gap:6px; min-width:160px}
.ctrl--search{flex:1; min-width:220px}
.ctrl--full{width:100%; min-width:0}
.ctrl__label{font-size:12px; color:var(--muted); opacity:.9}
.ctrl__input{
  background:rgba(0,0,0,.35);
  border:1px solid rgba(255,170,60,.18);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
  box-shadow:0 0 0 1px rgba(0,0,0,.35) inset;
}
.ctrl__input:focus{
  border-color:rgba(255,170,60,.42);
  box-shadow:0 0 0 1px rgba(255,170,60,.32) inset, 0 0 0 4px rgba(255,170,60,.08);
}

.closeBtn{
  margin-left:auto;
  align-self:flex-start;
  text-decoration:none;
  background:rgba(0,0,0,.30);
  border:1px solid rgba(255,170,60,.20);
  border-radius:999px;
  padding:8px 14px;
  font-size:14px;
  opacity:.92;
}
.closeBtn:hover{border-color:rgba(255,170,60,.40); opacity:1}

.storeBody{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:0;
  min-height:auto;
}


/* Products */
.storeMain{
  padding:16px;
  border-right:1px solid rgba(255,170,60,.12);
  overflow:visible;
  max-height:none;
}


.products{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  align-content:start;
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.03), transparent 22%),
             rgba(0,0,0,.26);
  border:1px solid rgba(255,170,60,.14);
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 10px 24px rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
  min-height:220px;
}
.card:hover{border-color:rgba(255,170,60,.30)}
.card__img{
  height:116px;
  background:rgba(0,0,0,.35);
  border-bottom:1px solid rgba(255,170,60,.10);
  display:flex;
  align-items:center;
  justify-content:center;
}
.card__img img{width:100%; height:100%; object-fit:cover; opacity:.95}
.card__body{padding:12px 12px 12px; display:flex; flex-direction:column; gap:8px; flex:1}
.card__name{font-weight:650; line-height:1.2}
.card__desc{color:var(--muted); font-size:13px; line-height:1.35; min-height:34px}
.card__meta{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto}
.price{font-weight:700}
.tag{
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,170,60,.18);
  background:rgba(0,0,0,.22);
  color:var(--amber1);
}

.card__actions{
  display:flex;
  gap:10px;
  padding:12px;
  border-top:1px solid rgba(255,170,60,.10);
}
.btn{
  border-radius:14px;
  padding:10px 12px;
  border:1px solid rgba(255,170,60,.18);
  background:rgba(0,0,0,.25);
  cursor:pointer;
  flex:1;
}
.btn:hover{border-color:rgba(255,170,60,.38)}
.btn--primary{
  background:linear-gradient(180deg, rgba(255,195,77,.26), rgba(0,0,0,.20));
  border-color:rgba(255,170,60,.38);
}
.btn--primary:hover{border-color:rgba(255,170,60,.58)}
.btn:disabled{opacity:.5; cursor:not-allowed}

.empty{padding:46px 8px; text-align:center}
.empty__title{font-weight:700; font-size:18px}
.empty__sub{color:var(--muted)}

/* Cart side */
.storeSide{
  padding:16px;
  overflow:visible;
  max-height:none;
  align-self:start;
}


.sideHeader{
  text-align:center;
  padding:6px 0 10px;
  border-bottom:1px solid rgba(255,170,60,.12);
}
.sideTitle{
  font-weight:750;
  letter-spacing:.16em;
  font-size:14px;
}
.sideHint{color:var(--muted); font-size:12px; padding-top:6px}

.cartList{padding:12px 0; display:flex; flex-direction:column; gap:10px; min-height:86px}
.cartItem{
  border:1px solid rgba(255,170,60,.14);
  background:rgba(0,0,0,.22);
  border-radius:16px;
  padding:10px;
  display:grid;
  grid-template-columns: 1fr auto;
  gap:8px;
}
.cartItem__name{font-weight:650; font-size:13px; line-height:1.25}
.cartItem__meta{color:var(--muted); font-size:12px}
.cartItem__right{display:flex; flex-direction:column; align-items:flex-end; gap:8px}
.qtyRow{display:flex; gap:6px; align-items:center}
.qtyBtn{
  width:28px;height:28px;border-radius:10px;
  border:1px solid rgba(255,170,60,.18);
  background:rgba(0,0,0,.26);
  cursor:pointer;
}
.qtyBtn:hover{border-color:rgba(255,170,60,.38)}
.removeBtn{
  border:none;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-size:12px;
  text-decoration:underline;
  opacity:.9;
}
.removeBtn:hover{color:var(--text); opacity:1}

.sideTotals{border-top:1px solid rgba(255,170,60,.12); padding-top:12px}
.totalRow{display:flex; justify-content:space-between; align-items:center; padding:6px 0 10px}
.fineprint{color:var(--muted); font-size:12px; margin:10px 0 0}

.downloads{margin-top:16px; border-top:1px solid rgba(255,170,60,.12); padding-top:12px}
.downloads__title{
  text-align:center;
  font-weight:750;
  letter-spacing:.16em;
  font-size:13px;
  margin-bottom:10px;
}
.downloads__list{color:var(--muted); font-size:13px; min-height:20px}

.floatCheckout{
  position:absolute;
  right:18px;
  bottom:18px;
  display:none;
  gap:10px;
  align-items:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,170,60,.22);
  background:rgba(0,0,0,.35);
  cursor:pointer;
  box-shadow:0 10px 30px rgba(0,0,0,.45);
}
.floatCheckout:hover{border-color:rgba(255,170,60,.44)}
.floatCheckout__icon{filter:saturate(1.2)}
.floatCheckout__text{font-weight:650}

/* Responsive */
@media (max-width: 1100px){
  .products{grid-template-columns: repeat(2, minmax(0, 1fr))}
  .storeBody{grid-template-columns: 1fr 340px}
}
@media (max-width: 860px){
  .storeTop{flex-wrap:wrap}
  .storeControls{order:3; width:100%}
  .closeBtn{order:2}
  .storeBody{grid-template-columns: 1fr}
  .storeMain{border-right:none; max-height:none}
  .storeSide{
    border-top:1px solid rgba(255,170,60,.12);
    max-height:none;
  }
  .floatCheckout{display:flex}
}
