:root{
  --bg: #020b1f;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.09);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --primary: #ffffff;
  --primary-2: #dbe9ff;
  --danger: #fb7185;
  --border: rgba(255,255,255,0.14);
  --shadow: 0 14px 40px rgba(0,0,0,0.35);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
}

*{ box-sizing: border-box; }
html,body{ height: 100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1100px 700px at 20% -10%, rgba(255,255,255,0.12), rgba(2,11,31,0)) ,
              radial-gradient(900px 600px at 90% 0%, rgba(183,206,255,0.12), rgba(2,11,31,0)) ,
              var(--bg);
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 16px;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,0.65);
  border-bottom: 1px solid var(--border);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand{
  font-weight: 800;
  letter-spacing: 0.2px;
  display:flex;
  align-items:center;
  gap: 10px;
  white-space: nowrap;
}

.brand-logo{
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
}

.brand-mark{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 0 6px rgba(255,255,255,0.12);
}

.nav{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a{
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--muted);
}
.nav a:hover{
  color: var(--text);
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.03);
  text-decoration: none;
}

.nav a.active{
  color: var(--text);
  border-color: rgba(255,255,255,0.38);
  background: rgba(255,255,255,0.12);
}

.search{
  display:flex;
  align-items:center;
  gap: 10px;
}

.search-form{
  display:flex;
  align-items:center;
  gap: 10px;
}

.input{
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 0 12px;
  min-width: 220px;
}
.input::placeholder{ color: rgba(255,255,255,0.45); }

.btn{
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
}
.btn:hover{ background: rgba(255,255,255,0.06); }
.btn:disabled{ opacity: 0.6; cursor: not-allowed; }

.btn-primary{
  border-color: rgba(255,255,255,0.65);
  background: linear-gradient(135deg, rgba(255,255,255,0.35), rgba(219,233,255,0.2));
}

.btn-ghost{
  background: transparent;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.36);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

main{
  padding: 26px 0 60px;
}

.hero{
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.03);
  box-shadow: var(--shadow);
  overflow:hidden;
  position: relative;
}
.hero::before{
  content:"";
  position:absolute;
  width: 500px;
  height: 500px;
  left: -250px;
  top: -300px;
  background: radial-gradient(circle at center, rgba(255,255,255,0.2), rgba(255,255,255,0));
}

.hero h1{
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.1;
  position: relative;
}
.hero p{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  position: relative;
  max-width: 60ch;
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.col-12{ grid-column: span 12; }
.col-8{ grid-column: span 8; }
.col-6{ grid-column: span 6; }
.col-4{ grid-column: span 4; }

@media (max-width: 960px){
  .col-8{ grid-column: span 12; }
  .col-6{ grid-column: span 12; }
  .col-4{ grid-column: span 12; }
  .input{ min-width: 150px; }
}

.card{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.card-title{
  font-weight: 800;
  margin-bottom: 6px;
}
.card-desc{
  color: var(--muted);
  font-size: 14px;
  min-height: 44px;
}
.card-footer{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.price{
  font-weight: 800;
  letter-spacing: 0.2px;
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

.compare-at{
  font-weight: 800;
  color: rgba(255,255,255,0.55);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.sale-pill{
  font-size: 12px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.14);
}

.muted{ color: var(--muted); }

.section-title{
  margin: 18px 0 10px;
  font-size: 18px;
  font-weight: 800;
}

.products{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.products .card{
  grid-column: span 4;
}
@media (max-width: 980px){
  .products .card{ grid-column: span 6; }
}
@media (max-width: 680px){
  .products .card{ grid-column: span 12; }
}

.form{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.field{ grid-column: span 6; display:flex; flex-direction:column; gap: 6px; }
.field.full{ grid-column: span 12; }
label{
  color: var(--muted);
  font-size: 13px;
}
textarea.input{ height: 110px; padding-top: 10px; resize: vertical; }

.error{
  color: var(--danger);
  font-weight: 700;
  margin-top: 8px;
}

.cart-row{
  display:grid;
  grid-template-columns: 1.4fr 1fr 0.8fr 0.8fr;
  gap: 12px;
  align-items:center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.03);
  margin-bottom: 12px;
}
@media (max-width: 720px){
  .cart-row{ grid-template-columns: 1fr; }
}

.cart-name{ font-weight: 800; }
.cart-qty{
  display:flex;
  align-items:center;
  gap: 10px;
}
.qty-btn{
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
}
.qty-input{
  width: 64px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  text-align: center;
}
.link-danger{
  color: var(--danger);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-weight: 800;
}
.link-danger:hover{ text-decoration: underline; }

.summary{
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.03);
  padding: 14px;
}
.summary-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.12);
}
.summary-row:last-child{ border-bottom: none; }

#toast{
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(10,16,28,0.82);
  color: var(--text);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
#toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}
#toast[data-kind="error"]{
  border-color: rgba(251,113,133,0.5);
}

/* Footer */
.footer{
  color: var(--muted);
  font-size: 13px;
  padding: 16px 0 40px;
}

.order-card{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
}
.order-id{ font-weight: 900; margin-bottom: 6px; }
.order-meta{ color: var(--muted); font-size: 14px; margin-top: 6px; }

.banner-slider{
  width: 100%;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 21 / 9;
}

.banner-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 500ms ease;
}

.banner-slide.is-active{
  opacity: 1;
}

.banner-slide img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.banner-overlay{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  background: linear-gradient(0deg, rgba(2,11,31,0.72), rgba(2,11,31,0));
}

.banner-overlay h1{
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}

.banner-overlay p{
  margin: 8px 0 0;
  max-width: 56ch;
  color: var(--muted);
}

.banner-dots{
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 8px;
}

.banner-dots .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.4);
}

.banner-dots .dot.is-active{
  background: rgba(255,255,255,0.95);
}

