/* Kachi Demo Site — Nova Tech Store */
:root {
  --brand:     #6C47FF;
  --brand-dk:  #5036D5;
  --accent:    #00D4AA;
  --bg:        #0B0C10;
  --surface:   #13141A;
  --surface2:  #1E1F28;
  --border:    #2A2B36;
  --text:      #E8E9F0;
  --muted:     #8A8B99;
  --danger:    #FF4D6A;
  --success:   #00D4AA;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,12,16,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: auto;
  display: flex; align-items: center; gap: 2rem;
  padding: .9rem 1.5rem;
}
.nav-logo {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -.5px;
  color: var(--text); display: flex; align-items: center; gap: .5rem;
}
.nav-logo span { color: var(--brand); }
.nav-links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav-links a {
  color: var(--muted); font-size: .9rem; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--brand); color: #fff !important;
  padding: .45rem 1rem; border-radius: 8px; font-size: .85rem;
  font-weight: 600; transition: background .2s;
}
.nav-cta:hover { background: var(--brand-dk) !important; color: #fff !important; }
.cart-badge {
  position: relative; display: inline-flex; align-items: center;
}
.cart-badge .badge {
  position: absolute; top: -8px; right: -10px;
  background: var(--danger); color: #fff;
  font-size: .65rem; font-weight: 700;
  border-radius: 50%; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.4rem; border-radius: 10px;
  font-weight: 600; font-size: .9rem;
  border: none; cursor: pointer; transition: all .2s;
}
.btn-primary {
  background: var(--brand); color: #fff;
}
.btn-primary:hover { background: var(--brand-dk); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost {
  background: var(--surface2); color: var(--text);
}
.btn-ghost:hover { background: var(--border); }
.btn-sm { padding: .45rem 1rem; font-size: .8rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }

/* ── Hero ── */
.hero {
  max-width: 1200px; margin: auto;
  padding: 6rem 1.5rem 4rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(108,71,255,.15); color: var(--brand);
  padding: .35rem .85rem; border-radius: 20px;
  font-size: .8rem; font-weight: 600; margin-bottom: 1.25rem;
  border: 1px solid rgba(108,71,255,.3);
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -.5px;
  margin-bottom: 1.25rem;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
}
.hero-visual-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  padding: 2rem;
}
.hero-visual-chart {
  width: 100%; display: flex; align-items: flex-end; gap: .5rem;
  height: 120px;
}
.hero-visual-chart .bar {
  flex: 1; border-radius: 6px 6px 0 0;
  background: linear-gradient(to top, var(--brand), var(--accent));
  opacity: .7; transition: opacity .3s;
  animation: barGrow .8s ease-out forwards;
  transform-origin: bottom;
}
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.hero-stat-row {
  display: flex; gap: 1.5rem; width: 100%;
}
.hero-stat {
  flex: 1; background: var(--bg); border-radius: 8px; padding: .75rem 1rem;
  border: 1px solid var(--border);
}
.hero-stat .val { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.hero-stat .lbl { font-size: .75rem; color: var(--muted); }

/* ── Section ── */
.section {
  max-width: 1200px; margin: auto;
  padding: 4rem 1.5rem;
}
.section-header { margin-bottom: 2.5rem; }
.section-header h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: .5rem; }
.section-header p { color: var(--muted); }

/* ── Product Grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 8px 32px rgba(108,71,255,.2);
}
.product-img {
  width: 100%; aspect-ratio: 4/3;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
}
.product-body { padding: 1.25rem; }
.product-cat {
  font-size: .75rem; color: var(--brand); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: .4rem;
}
.product-name {
  font-size: 1rem; font-weight: 700; margin-bottom: .35rem;
  color: var(--text);
}
.product-desc { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.product-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.product-price { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.product-price .was {
  font-size: .8rem; color: var(--muted);
  text-decoration: line-through; font-weight: 400; margin-right: .4rem;
}
.badge-new {
  background: rgba(0,212,170,.15); color: var(--success);
  font-size: .7rem; font-weight: 700; padding: .2rem .55rem;
  border-radius: 20px; border: 1px solid rgba(0,212,170,.3);
}
.badge-sale {
  background: rgba(255,77,106,.15); color: var(--danger);
  font-size: .7rem; font-weight: 700; padding: .2rem .55rem;
  border-radius: 20px; border: 1px solid rgba(255,77,106,.3);
}

/* ── Filters ── */
.filter-bar {
  display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 2rem;
}
.filter-chip {
  padding: .4rem 1rem; border-radius: 20px; font-size: .85rem;
  font-weight: 500; cursor: pointer; transition: all .2s;
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--muted);
}
.filter-chip:hover, .filter-chip.active {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

/* ── Cart ── */
.cart-layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 2rem;
  align-items: start;
}
.cart-item {
  display: flex; gap: 1rem; align-items: center;
  padding: 1.25rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 1rem;
}
.cart-item-img {
  width: 80px; height: 80px; border-radius: 8px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; margin-bottom: .25rem; }
.cart-item-meta { font-size: .85rem; color: var(--muted); }
.cart-item-price { font-size: 1.1rem; font-weight: 700; }
.qty-ctrl {
  display: flex; align-items: center; gap: .75rem;
  margin-top: .5rem;
}
.qty-btn {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.qty-btn:hover { background: var(--border); }
.qty-val { font-weight: 600; min-width: 20px; text-align: center; }
.cart-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; position: sticky; top: 80px;
}
.cart-summary h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; }
.summary-row {
  display: flex; justify-content: space-between;
  font-size: .9rem; margin-bottom: .75rem; color: var(--muted);
}
.summary-row.total {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  border-top: 1px solid var(--border); padding-top: .75rem; margin-top: .75rem;
}

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .5rem; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%; padding: .7rem 1rem;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: .9rem;
  outline: none; transition: border-color .2s;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); }
textarea { resize: vertical; min-height: 100px; }

/* ── Blog ── */
.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.blog-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.blog-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.blog-img {
  height: 180px; background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.blog-body { padding: 1.25rem; }
.blog-tag {
  font-size: .75rem; color: var(--accent); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: .5rem;
}
.blog-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.blog-excerpt { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.blog-meta { font-size: .8rem; color: var(--muted); }

/* ── Stats Banner ── */
.stats-banner {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-inner {
  max-width: 1200px; margin: auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 2.5rem 1.5rem;
}
.stat-item { text-align: center; }
.stat-item .val {
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-item .lbl { font-size: .85rem; color: var(--muted); margin-top: .25rem; }

/* ── Newsletter ── */
.newsletter {
  background: linear-gradient(135deg, rgba(108,71,255,.15), rgba(0,212,170,.1));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 3rem 2rem; text-align: center;
  margin: 0 1.5rem 4rem;
  max-width: 1200px; margin-left: auto; margin-right: auto;
}
.newsletter h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: .75rem; }
.newsletter p { color: var(--muted); margin-bottom: 1.5rem; }
.newsletter-form {
  display: flex; gap: .75rem; max-width: 460px; margin: auto;
}
.newsletter-form input { flex: 1; }

/* ── Footer ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1200px; margin: auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
}
.footer-brand p { font-size: .85rem; color: var(--muted); margin-top: .75rem; max-width: 280px; }
.footer-col h4 { font-size: .85rem; font-weight: 700; margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .6rem; }
.footer-col a { font-size: .85rem; color: var(--muted); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1200px; margin: 2rem auto 0;
  border-top: 1px solid var(--border); padding-top: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p { font-size: .8rem; color: var(--muted); }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: .75rem;
}
.toast {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: .85rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .75rem;
  animation: slideIn .3s ease; font-size: .9rem;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
@keyframes slideIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Page header ── */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}
.page-header-inner {
  max-width: 1200px; margin: auto;
}
.page-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: .35rem; }
.page-header p { color: var(--muted); }
.breadcrumb { font-size: .8rem; color: var(--muted); margin-bottom: .75rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 .4rem; }

/* ── Product detail ── */
.product-detail-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
.product-detail-img {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 8rem;
}
.product-detail-info .price {
  font-size: 2rem; font-weight: 800; margin: 1rem 0;
}
.product-detail-info .rating {
  display: flex; align-items: center; gap: .5rem;
  font-size: .9rem; color: var(--muted); margin-bottom: 1rem;
}
.stars { color: #F5A623; letter-spacing: 2px; }
.product-detail-info p { color: var(--muted); margin-bottom: 1.5rem; line-height: 1.8; }
.spec-list { list-style: none; margin-bottom: 1.5rem; }
.spec-list li {
  display: flex; gap: 1rem; padding: .5rem 0;
  border-bottom: 1px solid var(--border); font-size: .9rem;
}
.spec-list li:last-child { border-bottom: none; }
.spec-list li strong { color: var(--muted); min-width: 120px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .hero-visual { display: none; }
  .cart-layout { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .product-detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .newsletter-form { flex-direction: column; }
}
