:root {
  color-scheme: light;
  --ink: #17233c;
  --muted: #6b7280;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --line: #e5e7eb;
  --surface: #f5f7fb;
  --white: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--blue); font-size: 1.2rem; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 22px; color: #39445b; font-size: .94rem; }
.nav-links > a:not(.button):hover, .text-link:hover { color: var(--blue-dark); }
.nav-links a[aria-current="page"] { color: var(--blue); font-weight: 700; }
.menu-toggle { display: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--ink); background: white; }
.cart-link { white-space: nowrap; }
.cart-count { display: inline-grid; min-width: 22px; height: 22px; place-items: center; margin-left: 4px; border-radius: 999px; background: #fbbf24; color: #422006; font-size: .78rem; font-weight: 800; }

.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--blue); border-radius: 10px; padding: 10px 18px; background: var(--blue); color: white; font-weight: 700; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.button-small { min-height: 38px; padding: 7px 13px; }
.button-outline { border-color: #bfcced; background: transparent; color: var(--blue); }
.button-outline:hover { background: #eff6ff; color: var(--blue-dark); }
.button-full { width: 100%; margin-top: 20px; }

.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; padding-block: 72px 64px; }
.hero-copy { max-width: 520px; }
.eyebrow { margin: 0 0 10px; color: #536da9; font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.08; letter-spacing: -.05em; }
.hero h1 span { color: var(--blue); }
.lead { max-width: 470px; margin-bottom: 24px; color: var(--muted); font-size: 1.14rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; min-height: 320px; display: grid; place-items: center; border-radius: 28px; padding: 28px; background: #eef2ff; }
.hero-art > img { width: 100%; max-height: 310px; object-fit: contain; }
.hero-note { position: absolute; right: 18px; bottom: 18px; display: grid; gap: 2px; border-radius: 12px; padding: 13px 16px; background: white; box-shadow: 0 8px 28px #17233c1c; font-size: .85rem; }
.hero-note span { color: var(--muted); }

.section { padding-block: 42px 64px; }
.section-muted { background: var(--surface); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading .eyebrow { margin-bottom: 4px; }
.section-heading h2 { margin-bottom: 0; font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.03em; }
.text-link { color: var(--blue); font-weight: 700; }
.category-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.category-card { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: white; font-weight: 700; transition: box-shadow .15s ease, transform .15s ease; }
.category-card:hover, .product-card:hover, .dashboard-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px #17233c12; }
.category-card img { width: 76px; height: 72px; object-fit: contain; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; transition: box-shadow .15s ease, transform .15s ease; }
.product-image { display: grid; height: 200px; place-items: center; padding: 20px; background: #f8fafc; }
.product-image img { width: 100%; height: 100%; object-fit: contain; }
.product-info { padding: 16px; }
.product-category { color: var(--muted); font-size: .78rem; }
.product-info h3 { margin: 5px 0 15px; font-size: 1.02rem; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.page-content { min-height: 65vh; padding-block: 46px 72px; }
.page-intro { margin-bottom: 28px; }
.page-intro h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-intro > p:last-child, .muted { color: var(--muted); }
.catalog { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: start; gap: 30px; }
.filter-panel, .form-card { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: white; box-shadow: 0 8px 28px #17233c08; }
.field-label { display: block; margin: 15px 0 7px; color: #39445b; font-size: .88rem; font-weight: 700; }
.field-label:first-child { margin-top: 0; }
.filter-title { margin-top: 24px; }
.input { width: 100%; min-height: 44px; border: 1px solid #d5dbe6; border-radius: 9px; padding: 10px 12px; background: white; color: var(--ink); }
.input:focus { outline: 3px solid #bfdbfe; border-color: var(--blue); }
textarea.input { resize: vertical; }
.filter-list { display: grid; gap: 5px; }
.filter-button { border: 0; border-radius: 8px; padding: 9px 10px; background: transparent; color: #475569; text-align: left; cursor: pointer; }
.filter-button:hover, .filter-button.is-active { background: #eff6ff; color: var(--blue-dark); font-weight: 700; }
.results-count { color: var(--muted); font-size: .9rem; }
.catalog-results .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.empty-state { padding: 24px; border-radius: 12px; background: var(--surface); color: var(--muted); }
.empty-state[hidden] { display: none; }

.breadcrumb { margin: 0 0 22px; color: var(--muted); font-size: .9rem; }
.breadcrumb a { color: var(--blue); }
.detail-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 5vw, 48px); }
.detail-image { min-height: 360px; display: grid; place-items: center; border-radius: 16px; padding: 24px; background: var(--surface); }
.detail-image img { max-height: 320px; object-fit: contain; }
.detail-info h1 { font-size: clamp(2rem, 4vw, 3rem); }
.detail-description { color: var(--muted); }
.detail-price { margin-block: 20px; color: var(--blue-dark); font-size: 1.7rem; font-weight: 800; }
.benefit-list { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 22px; padding-left: 18px; color: #475569; }
.demo-note { margin: 18px 0 0; color: var(--muted); font-size: .9rem; }

.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); align-items: center; gap: 48px; max-width: 1000px; margin: 0 auto; }
.auth-layout-wide { grid-template-columns: minmax(0, .8fr) minmax(360px, 560px); max-width: 1080px; }
.auth-art { display: grid; min-height: 340px; place-items: center; border-radius: 24px; padding: 30px; background: #eef2ff; }
.auth-art img { max-height: 300px; object-fit: contain; }
.form-card h1 { margin-bottom: 8px; font-size: 2rem; }
.form-card form { margin-top: 22px; }
.form-card .field-label { margin-top: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-foot { margin: 20px 0 0; color: var(--muted); text-align: center; }
.form-foot a { color: var(--blue); font-weight: 700; }
.form-message { min-height: 1.4em; margin: 12px 0 0; color: #17623b; font-size: .9rem; }

.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.dashboard-card { display: grid; justify-items: start; gap: 9px; border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: white; transition: box-shadow .15s ease, transform .15s ease; }
.dashboard-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: #eff6ff; color: var(--blue); font-size: 1.7rem; }
.dashboard-card > span:last-child { color: var(--muted); font-size: .9rem; }
.category-admin-layout { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.category-admin-layout h2 { font-size: 1.2rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; }
th { color: #475569; font-size: .85rem; }

.site-footer { border-top: 1px solid var(--line); background: #f8fafc; }
.footer-content { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.footer-content p { margin: 0; color: var(--muted); font-size: .88rem; }

@media (max-width: 900px) {
  .nav { flex-wrap: wrap; padding-block: 14px; }
  .menu-toggle { display: block; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding-bottom: 8px; }
  .nav-links.is-open { display: flex; }
  .nav-links > a { padding: 8px 0; }
  .nav-links > .button { padding: 8px 13px; }
  .hero { gap: 28px; padding-top: 48px; }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid, .catalog-results .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 28px, 1120px); }
  .hero { grid-template-columns: 1fr; padding-block: 38px 30px; }
  .hero-art { min-height: 250px; }
  .section { padding-block: 30px 44px; }
  .section-heading { align-items: start; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .category-card { min-height: 130px; }
  .product-grid, .catalog-results .product-grid { gap: 12px; }
  .product-image { height: 150px; padding: 12px; }
  .product-info { padding: 12px; }
  .product-bottom { align-items: start; flex-direction: column; }
  .catalog { grid-template-columns: 1fr; gap: 18px; }
  .filter-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-card, .auth-layout, .auth-layout-wide, .category-admin-layout { grid-template-columns: 1fr; gap: 20px; }
  .detail-image { min-height: 260px; }
  .detail-image img { max-height: 230px; }
  .auth-art { min-height: 220px; }
  .auth-art img { max-height: 190px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .footer-content { align-items: start; flex-direction: column; gap: 4px; }
}
