@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=DM+Mono:wght@400;500&display=swap');

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

:root {
  --bg:       #f9f9f7;
  --surface:  #ffffff;
  --border:   #e8e8e4;
  --ink:      #111110;
  --ink-2:    #555550;
  --ink-3:    #999990;
  --accent:   #0a0a0a;
  --accent-h: #2a2a2a;
  --blue:     #1a56ff;
  --blue-h:   #0033cc;
  --green:    #00875a;
  --red:      #e03b3b;
  --radius:   10px;
  --shadow:   0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.06);
  --shadow-l: 0 2px 8px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.1);
}

html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 15px; }

/* ── Nav ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(249,249,247,.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 2rem;
  padding: 0 2.5rem; height: 60px;
}
.nav-logo { font-size: 1.1rem; font-weight: 600; text-decoration: none; color: var(--ink); letter-spacing: -.3px; }
.nav-logo span { color: var(--blue); }
.nav-links { display: flex; gap: .25rem; flex: 1; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-size: .875rem; padding: .35rem .75rem; border-radius: 6px; transition: background .15s, color .15s; }
.nav-links a:hover { background: var(--border); color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.cart-btn {
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none; color: var(--ink); font-size: .875rem; font-weight: 500;
  padding: .4rem .9rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); transition: box-shadow .15s;
}
.cart-btn:hover { box-shadow: var(--shadow); }
.cart-count {
  background: var(--blue); color: #fff; font-size: .7rem; font-weight: 600;
  width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.page-header { padding: 3rem 0 2rem; }
.page-header h1 { font-size: 2rem; font-weight: 600; letter-spacing: -.5px; }
.page-header p { color: var(--ink-2); margin-top: .35rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.4rem; border-radius: var(--radius); font-family: inherit;
  font-size: .875rem; font-weight: 500; cursor: pointer; transition: all .15s; border: none; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-h); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,86,255,.35); }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; border-radius: 12px; }
.btn-full { width: 100%; }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-l); transform: translateY(-2px); }

/* ── Product grid ── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.product-card { cursor: pointer; text-decoration: none; color: inherit; display: block; }
.product-img { aspect-ratio: 4/3; overflow: hidden; background: #f2f2f0; position: relative; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-img img { transform: scale(1.04); }
.product-badge { position: absolute; top: .75rem; left: .75rem; background: var(--ink); color: #fff; font-size: .7rem; font-weight: 600; padding: .2rem .55rem; border-radius: 4px; letter-spacing: .3px; }
.product-badge.sale { background: var(--red); }
.product-badge.new { background: var(--blue); }
.product-info { padding: 1rem 1.1rem 1.2rem; }
.product-category { font-size: .75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .25rem; }
.product-name { font-weight: 600; font-size: .95rem; margin-bottom: .4rem; letter-spacing: -.2px; }
.product-rating { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--ink-2); margin-bottom: .6rem; }
.stars { color: #f5a623; letter-spacing: 1px; }
.product-price { font-size: 1.1rem; font-weight: 600; letter-spacing: -.3px; }

/* ── Stars ── */
.star-filled { color: #f5a623; }
.star-empty { color: var(--border); }

/* ── Badges ── */
.badge { display: inline-block; font-size: .7rem; font-weight: 600; padding: .2rem .6rem; border-radius: 4px; }
.badge-green { background: #e6f4ee; color: var(--green); }
.badge-blue { background: #e8efff; color: var(--blue); }
.badge-red { background: #fde8e8; color: var(--red); }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: #fff; padding: .75rem 1.5rem; border-radius: 50px;
  font-size: .875rem; font-weight: 500; z-index: 999; transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap; box-shadow: var(--shadow-l);
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ── Misc ── */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.text-muted { color: var(--ink-2); }
.text-small { font-size: .825rem; }
.mono { font-family: 'DM Mono', monospace; }
