:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1b1f27;
  --muted: #5c6575;
  --line: #e3e6eb;
  --brand: #0f6bdc;
  --brand-dark: #0a4fa6;
  --accent: #ffb400;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: #11161f; color: #c9d1dd; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar a { color: #fff; }

/* Header */
header.site { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
header.site .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 22px; color: var(--text); letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--brand); }
.logo svg { width: 28px; height: 28px; }
nav.main { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
nav.main a { color: var(--text); font-weight: 500; font-size: 15px; }
nav.main a.active { color: var(--brand); }
.cart-btn {
  background: var(--brand); color: #fff; border: 0; border-radius: 999px;
  padding: 8px 16px; font-weight: 600; cursor: pointer; font-size: 14px;
}
.cart-btn:hover { background: var(--brand-dark); }

/* Hero */
.hero { background: linear-gradient(120deg, #0f6bdc 0%, #0a3f86 100%); color: #fff; }
.hero .container { padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 12px; line-height: 1.15; }
.hero p { font-size: 18px; max-width: 560px; margin: 0 0 24px; color: #dbe7fb; }
.btn {
  display: inline-block; background: var(--accent); color: #1b1f27; font-weight: 700;
  padding: 12px 22px; border-radius: var(--radius); border: 0; cursor: pointer; font-size: 15px;
}
.btn:hover { text-decoration: none; filter: brightness(0.95); }
.btn.secondary { background: var(--brand); color: #fff; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 32px 0; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature strong { display: block; margin-bottom: 4px; }
.feature span { color: var(--muted); font-size: 14px; }

/* Sections */
section { padding: 24px 0 40px; }
h2.section-title { font-size: 26px; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 24px; }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filters button {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font-size: 14px; color: var(--text);
}
.filters button.active { background: var(--text); color: #fff; border-color: var(--text); }

/* Products */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .img { background: #eef3fb; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.card .img svg { width: 45%; height: auto; color: var(--brand); }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .cat { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.card h3 { font-size: 16px; margin: 0; }
.card p { font-size: 14px; color: var(--muted); margin: 0; flex: 1; }
.card .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.price { font-weight: 800; font-size: 18px; }
.add { background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 8px 12px; font-weight: 600; cursor: pointer; }
.add:hover { background: var(--brand-dark); }

/* Content pages */
.page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin: 32px 0; }
.page h1 { margin-top: 0; }
.page h2 { font-size: 20px; margin-top: 28px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.info-box { background: var(--bg); border-radius: var(--radius); padding: 18px; }
.info-box p { margin: 6px 0; }
form label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
form input, form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff;
}
form textarea { min-height: 120px; resize: vertical; }
form .btn { margin-top: 16px; }
.notice { display: none; margin-top: 12px; padding: 10px 12px; background: #e7f6ec; color: #17663a; border-radius: 8px; }

/* Cart drawer */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(380px, 100%); background: #fff;
  z-index: 50; transform: translateX(100%); transition: transform 0.25s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.overlay.open { display: block; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer header h3 { margin: 0; }
.drawer .close { background: none; border: 0; font-size: 26px; cursor: pointer; line-height: 1; }
.drawer .items { flex: 1; overflow-y: auto; padding: 8px 16px; }
.drawer .item { display: flex; justify-content: space-between; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.drawer .item .qty { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.drawer .item .qty button { width: 24px; height: 24px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; }
.drawer .empty { color: var(--muted); padding: 24px 0; text-align: center; }
.drawer footer { padding: 16px; border-top: 1px solid var(--line); }
.drawer .total { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; margin-bottom: 12px; }
.drawer .btn { width: 100%; text-align: center; }
.drawer .note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Footer */
footer.site { background: #11161f; color: #aab3c2; margin-top: 40px; font-size: 14px; }
footer.site .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-top: 36px; padding-bottom: 24px; }
footer.site h4 { color: #fff; margin: 0 0 10px; font-size: 15px; }
footer.site a { color: #aab3c2; display: block; margin: 4px 0; }
footer.site a:hover { color: #fff; }
footer.site p { margin: 4px 0; }
.copyright { border-top: 1px solid #262d39; text-align: center; padding: 14px 16px; font-size: 13px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1b1f27; color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity 0.2s; z-index: 60; pointer-events: none;
}
.toast.show { opacity: 1; }

@media (max-width: 640px) {
  nav.main { gap: 14px; }
  .page { padding: 20px; }
}
