:root{
  --bg:#0b0f12;
  --card:#10161b;
  --line:#22313f;
  --muted:#8aa2b2;
  --text:#e6f0f5;
  --ink:#052e16;
  --brand:#e2e8f0;
  --green:#22c55e;
  --accent:#38bdf8;
  --shadow:0 10px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box}

html,body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,Segoe UI,Inter,Arial;
}

a{color:inherit;text-decoration:none}

.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:16px;
}

/* HEADER */
header{
  position:sticky;
  top:0;
  z-index:40;
  background:linear-gradient(180deg,rgba(11,15,18,.95),rgba(11,15,18,.7));
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}

.bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 16px;
}

.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
}

.logo img{
  height:32px;
  width:32px;
  border-radius:8px;
}

.actions{display:flex;gap:8px}

.iconbtn{
  width:40px;
  height:40px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:var(--card);
  border:1px solid var(--line);
  cursor:pointer;
}

.iconbtn svg{
  width:22px;
  height:22px;
  stroke:var(--brand);
  fill:none;
  stroke-width:2;
}

.badge{
  position:absolute;
  top:-6px;
  right:-6px;
  min-width:18px;
  height:18px;
  background:#ef4444;
  color:#fff;
  border-radius:999px;
  display:grid;
  place-items:center;
  font-size:11px;
  padding:0 5px;
}

/* ================= HERO FIX ================= */

.hero{
  width:100%;
  margin-top:20px;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#0c1216;
}

.hero-slider{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  overflow:hidden;
  border-radius:28px;
}

.slide{
  position:absolute;
  inset:0;
  opacity:0;
  transition:1s ease;
}

.slide.active{
  opacity:1;
  z-index:1;
}

.slide img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.overlay{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,0.25);
  color:white;
}

.overlay h1{
  font-size:42px;
  margin-bottom:10px;
  font-weight:800;
}

.overlay p{
  font-size:18px;
  max-width:500px;
  margin-bottom:15px;
}

.overlay button{
  width:180px;
  height:50px;
  border:none;
  border-radius:12px;
  background:white;
  color:black;
  font-size:16px;
  font-weight:700;
  cursor:pointer;
  transition:.3s;
}

.overlay button:hover{
  transform:scale(1.05);
}

.slider-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(0,0,0,0.5);
  color:white;
  border:none;
  width:40px;
  height:40px;
  border-radius:50%;
  cursor:pointer;
  z-index:5;
}

.left-btn{left:10px}
.right-btn{right:10px}

/* MOBILE */
@media (max-width:768px){
  .overlay h1{font-size:26px}
  .overlay p{font-size:14px}
}

/* ================= GRID ================= */

h1{font-size:22px;margin:16px 0}

.grid{
  display:grid;
  gap:14px;
}

@media(min-width:768px){
  .grid.cols-4{grid-template-columns:repeat(4,1fr)}
  .grid.cols-3{grid-template-columns:repeat(3,1fr)}
}

/* ================= CARD ================= */

.card{
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--card);
  overflow:hidden;
}

.card .thumb{aspect-ratio:1/1;background:#0b1116}

.card .body{padding:12px}

.card .title{font-weight:700}

.price{display:flex;gap:8px;align-items:center}

/* BUTTON */
.btn{
  background:#1f2937;
  border:1px solid var(--line);
  color:var(--text);
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
}

.btn.primary{
  background:var(--green);
  color:var(--ink);
  font-weight:800;
}

/* FILTERS */
.section{margin:24px 0}

#filters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0;
}

select,input[type=search]{
  background:transparent;
  border:1px solid var(--line);
  color:var(--text);
  padding:8px 10px;
  border-radius:10px;
}

/* DRAWER */
.drawer{
  position:fixed;
  inset:0 0 0 auto;
  width:360px;
  background:var(--card);
  border-left:1px solid var(--line);
  transform:translateX(100%);
  transition:.25s;
  z-index:60;
  display:flex;
  flex-direction:column;
}

.drawer.open{transform:translateX(0)}

.drawer .head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
}

.drawer .cnt{
  padding:14px;
  overflow:auto;
}

/* MODAL */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.55);
  display:none;
  place-items:center;
  z-index:65;
}

.modal.open{display:grid}

.sheet{
  width:min(560px,94vw);
  max-height:90vh;
  overflow:auto;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:var(--shadow);
}

.sheet .head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
}

.sheet .body{
  padding:16px;
  display:grid;
  gap:10px;
}

.row{
  display:grid;
  gap:8px;
}

.row input,.row textarea,.row select{
  padding:10px;
  border-radius:10px;
  border:1px solid var(--line);
  background:transparent;
  color:var(--text);
  font-size:16px;
}

/* FOOTER */
footer{
  border-top:1px solid var(--line);
  margin-top:30px;
}

.foot{
  display:grid;
  gap:14px;
  padding:18px;
}

.badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.badges span{
  border:1px dashed var(--line);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  opacity:.9;
}

/* WISHLIST */
.heart{
  position:absolute;
  right:10px;
  top:10px;
  background:rgba(0,0,0,0.45);
  border:1px solid var(--line);
  border-radius:999px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  cursor:pointer;
}

.heart.active{
  background:rgba(34,197,94,.2);
}
html, body {
  width: 100%;
  overflow-x: hidden;
}

/* form container safety */
form {
  width: 100%;
  max-width: 100%;
  display: block;
}

/* prevent any hidden clipping */
input, textarea, select {
  max-width: 100%;
  box-sizing: border-box;
}

/* mobile safety spacing */
@media (max-width:768px){
  body {
    padding: 0;
  }

  .wrap {
    padding: 12px;
  }

  form {
    margin: 0 auto;
  }
}
.order-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

@media (max-width:768px){

  .order-grid-2{
    grid-template-columns:1fr;
  }

  .sheet{
    width:95vw;
    max-width:95vw;
  }

}
.image-popup{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.9);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

.image-popup.active{
  display:flex;
}

.image-popup img{
  max-width:90%;
  max-height:90%;
  border-radius:16px;
}

#closePopup{
  position:absolute;
  top:20px;
  right:25px;
  font-size:40px;
  color:white;
  cursor:pointer;
}

.slider-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,0.2);
  color:white;
  border:none;
  width:45px;
  height:45px;
  border-radius:50%;
  cursor:pointer;
}

.left-btn{left:15px;}
.right-btn{right:15px;}
.error{
  color:red;
  font-size:13px;
  margin-top:5px;
}
#toast{
  position:fixed;
  bottom:25px;
  right:25px;

  background:#111;
  color:#fff;

  padding:14px 18px;

  border-radius:12px;

  box-shadow:0 10px 25px rgba(0,0,0,.2);

  opacity:0;

  visibility:hidden;

  transform:translateY(20px);

  transition:.3s ease;

  z-index:99999;

  font-weight:600;
}

#toast.show{

  opacity:1;

  visibility:visible;

  transform:translateY(0);

}
.thumbs{

display:flex;

gap:8px;

overflow-x:auto;

scrollbar-width:none;

padding:8px 0;

}

.thumbs::-webkit-scrollbar{

display:none;

}

.thumb-nav{

display:flex;

justify-content:space-between;

margin:5px 0;

}

.thumb-left,
.thumb-right{

cursor:pointer;

border:none;

padding:6px 10px;

border-radius:8px;

background:#111;

color:#fff;

}

.image-popup{

display:none;

position:fixed;

inset:0;

background:rgba(0,0,0,.9);

z-index:99999;

justify-content:center;

align-items:center;

}

.image-popup.show{

display:flex;

}

#popupImg{

max-width:90%;

max-height:90%;

}

#closePopup{

position:absolute;

top:20px;

right:30px;

font-size:40px;

cursor:pointer;

color:#fff;

}
/* ================= DRAWER SYSTEM ================= */

.drawer{

position:fixed;

top:0;

right:-420px;

width:400px;

height:100vh;

background:#111;

z-index:9999;

transition:all .35s ease;

overflow-y:auto;

padding:20px;

box-shadow:-10px 0 30px rgba(0,0,0,.4);

}

.drawer.open{

right:0;

}

.drawer .head{

display:flex;

justify-content:space-between;

align-items:center;

margin-bottom:20px;

}

.drawer .cnt{

padding-top:10px;

}

@media(max-width:768px){

.drawer{

width:100%;

}

}
#toast{
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 9999;
}

#toast.show{
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-10px);
}