/* ============ Base ============ */
:root{
  --bg: #0b0f17;
  --card: #111827;
  --card2: #0f172a;
  --text: #e5e7eb;
  --muted: #a1a1aa;
  --border: rgba(255,255,255,.08);
  --primary: #7c3aed;
  --primary2: #6d28d9;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
}

:root.light{
  --bg: #f6f7fb;
  --card: #ffffff;
  --card2: #ffffff;
  --text: #0b1220;
  --muted: #4b5563;
  --border: rgba(0,0,0,.08);
  --primary: #6d28d9;
  --primary2: #5b21b6;
  --shadow: 0 10px 30px rgba(0,0,0,.12);
}

*{ box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1000px 600px at 20% -10%, rgba(124,58,237,.25), transparent 60%),
              radial-gradient(900px 600px at 90% 0%, rgba(59,130,246,.18), transparent 60%),
              var(--bg);
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }
.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

.muted{ color: var(--muted); }
.tiny{ font-size: 12px; }

hr.sep{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

/* ============ Buttons & Inputs ============ */
.btn{
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .08s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.btn:active{ transform: translateY(1px); }
.btn--primary{
  background: linear-gradient(180deg, var(--primary), var(--primary2));
  border-color: transparent;
}
.btn--ghost{
  background: rgba(255,255,255,.04);
}
:root.light .btn--ghost{ background: rgba(0,0,0,.03); }

.btn--full{ width: 100%; justify-content: center; }

.input, .textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline: none;
}
:root.light .input,
:root.light .textarea{
  background: rgba(0,0,0,.02);
}
.textarea{ resize: vertical; }

.pill{
  display: inline-flex;
  min-width: 26px;
  justify-content: center;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
}
.pill--big{ padding: 6px 12px; font-weight: 800; }

.badge{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
}

/* ============ Topbar ============ */
.topbar{
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(0,0,0,.25);
  border-bottom: 1px solid var(--border);
}
:root.light .topbar{ background: rgba(255,255,255,.65); }

.topbar__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
}
.brand__logo{
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.nav{
  display: none;
  gap: 16px;
  font-weight: 750;
}
.nav a{ opacity: .9; }
.nav a:hover{ opacity: 1; text-decoration: underline; }
.nav a.is-active{
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.actions{
  display: flex;
  align-items: center;
  gap: 10px;
}
.iconbtn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--text);
}

/* ============ Layout sections ============ */
.hero{ padding: 40px 0 10px; }
.hero__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}
.hero__content h1{
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}
.hero__cta{
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero__badges{
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section{ padding: 34px 0; }
.section--alt{
  background: rgba(255,255,255,.03);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
:root.light .section--alt{
  background: rgba(0,0,0,.02);
}

.section__head{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.section__head h2{ margin: 0; }

.card{
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
:root.light .card{
  background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.01));
}

/* ============ Product Grid ============ */
.grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.product{
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
}
:root.light .product{ background: rgba(255,255,255,.85); }

.product__top{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}
.product__title{
  font-weight: 950;
  margin: 0;
}
.product__price{
  font-weight: 950;
  white-space: nowrap;
}
.product__desc{
  margin: 10px 0 12px;
  color: var(--muted);
  line-height: 1.35;
}
.tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tag{
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255,255,255,.03);
}
.product__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============ Filters ============ */
.filters{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* ============ Product page ============ */
.product-page{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.product-hero h1{ margin: 0 0 6px; }
.kpis{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.kpi{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
}

/* ============ Cart page ============ */
.cart-layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.cart-item{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.04);
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.cart-item__row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}
.cart-item__title{ font-weight: 950; margin: 0; }
.cart-item__meta{ color: var(--muted); font-size: 13px; }

.qty{
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.qty button{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor: pointer;
  font-weight: 950;
}
.qty span{ min-width: 20px; text-align: center; font-weight: 850; }

.totals{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.04);
}
.totals__row{
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}
.totals__row--big{
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 18px;
}

.formgrid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.field span{ display: block; font-weight: 850; margin-bottom: 6px; }
.field--full{ grid-column: 1 / -1; }

/* ============ FAQ ============ */
.faq{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,.04);
  margin: 10px 0;
}
.faq summary{
  cursor: pointer;
  font-weight: 900;
}

/* ============ Footer ============ */
.footer{
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.footer__inner{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============ Responsive ============ */
@media (min-width: 760px){
  .nav{ display: flex; }
  .hero__grid{ grid-template-columns: 1.2fr .8fr; }
  .filters{ grid-template-columns: 1fr 260px; align-items: center; }
  .grid{ grid-template-columns: repeat(3, 1fr); }
  .product-page{ grid-template-columns: 1.2fr .8fr; }
  .cart-layout{ grid-template-columns: 1.2fr .8fr; }
  .formgrid{ grid-template-columns: repeat(2, 1fr); }
}

/* ============ Category cards (shop) ============ */
.catgrid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.catcard{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  padding: 14px;
  cursor: pointer;
  transition: transform .08s ease, border-color .2s ease, background .2s ease;
  text-align: left;
}

:root.light .catcard{
  background: rgba(255,255,255,.85);
}

.catcard:hover{
  transform: translateY(-1px);
}

.catcard.is-selected{
  border-color: rgba(124,58,237,.55);
}

.catcard__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catcard__icon{
  font-size: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}

.catcard__title{
  margin: 0;
  font-weight: 950;
}

.catcard__desc{
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 13px;
}

@media (min-width: 760px){
  .catgrid{ grid-template-columns: repeat(4, 1fr); }
}

