:root {
    color-scheme: light;
    --ink: #142538;
    --muted: #4d6177;
    --blue: #1456c1;
    --border: #dbe5ef;
    --surface: #f1f5f8;
    --white: #fff;
    --navy: #101f31;
    --accent: #bcefdc;
    font: 100%/1.5 "Segoe UI", system-ui, sans-serif;
    background: var(--surface);
    color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 1.25rem; }
h2 { font-size: 1.5rem; margin-bottom: .45rem; }
h3 { font-size: 1.13rem; }
a { color: #104ea8; }
small { display: block; color: var(--muted); }
main { flex: 1; padding-bottom: 3.5rem; }
.shell { width: min(86rem, calc(100% - 4rem)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-header {
    background: var(--navy);
    border-bottom: 1px solid #223a50;
    margin-bottom: 1.75rem;
}
.header-inner, .footer-inner, .section-head, .product-actions, .line-item, .total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.header-inner { display: grid; grid-template-columns: auto minmax(12rem, 1fr) auto; min-height: 5.5rem; gap: clamp(1rem, 4vw, 3rem); }
.brand { display: flex; gap: .65rem; align-items: center; color: white; text-decoration: none; font-size: 1.25rem; font-weight: 650; letter-spacing: -.025em; white-space: nowrap; }
.brand strong { color: var(--accent); }
.brand small { color: #bbcbd9; font-weight: 400; font-size: .75rem; letter-spacing: 0; }
.brand img { object-fit: contain; border-radius: 50%; width: 2.85rem; height: 2.85rem; }
.header-search { display: flex; align-items: stretch; min-width: 0; }
.header-search input[type="search"] { width: 100%; min-width: 0; border: 0; border-radius: .65rem 0 0 .65rem; padding-inline: .9rem; min-height: 2.8rem; }
.header-search button { display: flex; align-items: center; gap: .6rem; background: var(--accent); color: var(--navy); border-radius: 0 .65rem .65rem 0; padding-inline: 1rem; }
.header-search button:hover { background: #d6fae9; }
.search-icon { width: .8rem; height: .8rem; border: 2px solid currentColor; border-radius: 50%; position: relative; flex: 0 0 auto; }
.search-icon::after { content: ''; position: absolute; width: .4rem; height: 2px; background: currentColor; right: -.29rem; bottom: -.13rem; transform: rotate(45deg); }
nav, .footer-inner div { display: flex; align-items: center; gap: 1.2rem; }
nav a { color: var(--ink); font-weight: 650; text-decoration: none; }
nav a[aria-current="page"] { color: var(--blue); }
.site-header nav a { color: #e7eff6; white-space: nowrap; }
.site-header nav a[aria-current="page"] { color: var(--accent); }
.cart-link { background: #233b51; padding: .55rem .8rem; border-radius: .65rem; }
.cart-link span { background: var(--accent); color: var(--navy); border-radius: 1rem; padding: .1rem .38rem; font-size: .82rem; }

.hero {
    background: linear-gradient(112deg, #112439, #21485a);
    border-radius: 1.2rem;
    color: #fff;
    overflow: hidden;
    margin-bottom: 1.75rem;
}
.hero-with-image { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.hero-content { padding: clamp(2rem, 4vw, 3.75rem); align-self: center; }
.hero h1 { max-width: 13ch; margin: 0 0 .8rem; font-size: clamp(2.3rem, 4.6vw, 4.25rem); line-height: 1.02; letter-spacing: -.055em; }
.hero p { max-width: 34rem; color: #dce8f0; }
.hero-link { display: inline-flex; align-items: center; gap: .75rem; margin-top: 1.3rem; padding: .62rem 1rem; border-radius: .55rem; background: var(--accent); color: var(--navy); font-weight: 700; text-decoration: none; }
.hero-link:hover { background: #d6fae9; }
.hero-visual { display: grid; place-items: center; min-width: 0; padding: 1.75rem; background: radial-gradient(ellipse at 33% 18%, #f1fff7, #a4c7c6 85%); }
.hero-visual img { width: min(100%, 26rem); height: 15rem; object-fit: contain; mix-blend-mode: multiply; }
.section-head { margin-bottom: 1rem; align-items: flex-end; }
.section-head p { color: var(--muted); }
.catalog-layout { display: grid; grid-template-columns: minmax(12.5rem, 15rem) minmax(0, 1fr); gap: 1.35rem; align-items: start; scroll-margin-top: 1rem; }
.catalog-content { min-width: 0; }
.catalog-refine { background: white; border: 1px solid var(--border); border-radius: .9rem; padding: .95rem 1rem; }
.catalog-refine > summary { color: var(--ink); font-size: 1.1rem; font-weight: 750; }
.catalog-filters { display: grid; gap: .8rem; margin-top: .95rem; }
.catalog-filters label { display: grid; gap: .25rem; min-width: 0; font-size: .9rem; font-weight: 650; }
.catalog-filters select { width: 100%; min-width: 0; font-weight: 400; }
.catalog-filter-actions { display: grid; gap: .6rem; }
.catalog-filter-actions a { text-align: center; font-weight: 600; }
.catalog-toolbar { display: flex; flex-wrap: wrap; gap: .65rem 1rem; align-items: end; justify-content: space-between; margin-bottom: 1rem; }
.catalog-toolbar h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); margin: 0 0 .15rem; }
.catalog-toolbar p { color: var(--muted); font-size: .9rem; }
.catalog-sort { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; font-size: .88rem; }
.catalog-sort label { font-weight: 650; }

.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.product, .panel { background: var(--white); border: 1px solid var(--border); border-radius: .95rem; }
.product { overflow: hidden; display: flex; flex-direction: column; }
.product { box-shadow: 0 2px 6px #12294108; }
.product-visual { background: #f6f9fa; padding: 1rem; border-bottom: 1px solid #e7edf1; display: grid; place-items: center; height: 11.75rem; }
.product-visual img { width: 100%; max-width: 17rem; height: 9.75rem; object-fit: contain; color: var(--muted); text-align: center; mix-blend-mode: multiply; }
.product-image-empty { color: var(--muted); font-size: .82rem; }
.product-body { padding: .95rem 1rem 1rem; display: flex; flex: 1; flex-direction: column; gap: .55rem; }
.product-sku { color: var(--muted); font-size: .8rem; }
.product h3 { font-size: 1.1rem; line-height: 1.25; overflow-wrap: anywhere; }
.product-specs { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.product-specs li { padding: .2rem .4rem; border-radius: .3rem; background: #e9f1f3; color: #304b5d; font-size: .72rem; font-weight: 650; }
.product-actions { display: grid; justify-content: stretch; gap: .6rem; margin-top: auto; padding-top: .5rem; }
.product-actions button { width: 100%; }
.product-actions strong, .total strong { font-size: 1.2rem; color: var(--ink); white-space: nowrap; }
.product-actions strong { font-size: clamp(1.2rem, 2vw, 1.49rem); letter-spacing: -.035em; }
.product-actions small { font-size: .86rem; }
details { color: var(--muted); font-size: .91rem; }
details p { margin-top: .35rem; }
summary { cursor: pointer; color: var(--blue); }

input, select, button { font: inherit; }
input:not([type="hidden"], [type="checkbox"]), .catalog-filters select, .catalog-sort select { border: 1px solid #9bb0c7; border-radius: .55rem; min-height: 2.55rem; padding: .45rem .6rem; color: var(--ink); background: white; }
input:focus-visible, select:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #f07831; outline-offset: 2px; }
button { cursor: pointer; background: var(--blue); color: white; border: 1px solid transparent; border-radius: .55rem; padding: .45rem .8rem; min-height: 2.55rem; font-weight: 650; }
button:hover { background: #103c89; }
button.secondary { background: #eaf1fb; color: #103b7b; }
button.secondary:hover { background: #d8e7fa; }
.link-button { background: transparent; color: #104ea8; text-decoration: underline; }
.link-button:hover { background: #ebf1f8; }
.panel { padding: clamp(1rem, 3vw, 1.65rem); }
.checkout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: 1.2rem; margin-top: 1rem; }
.line-item { border-bottom: 1px solid var(--border); padding: .85rem 0; align-items: start; }
.total { font-weight: 650; padding-top: 1rem; }
.quantity { display: flex; flex-wrap: wrap; gap: .35rem; align-items: flex-end; }
.quantity label { display: grid; font-size: .88rem; }
.quantity input { width: 4.3rem; }
.form-stack { display: grid; gap: .8rem; }
.form-stack label { display: grid; gap: .25rem; font-weight: 600; }
.form-stack .check { display: flex; align-items: start; }
.form-stack p, .panel > p:not(.total) { color: var(--muted); }
.narrow { max-width: 44rem; margin: 1rem auto; }
.narrow .status { color: #154d86; background: #e7f0fc; border-radius: .5rem; padding: .55rem .75rem; display: inline-block; margin-bottom: .6rem; }
.narrow p + a { display: inline-block; margin-top: .55rem; }
.notice { padding: .65rem .9rem; background: #e7f5e9; color: #19572a; border: 1px solid #a8cdb0; border-radius: .55rem; margin-bottom: 1rem; }
.notice.error { background: #ffefed; color: #8f2519; border-color: #efb7ad; }
.admin-head { align-items: center; }
.admin-head h1 { margin: 0; }
.admin-products, .cancel-order { margin-top: 1rem; }
.import-form { background: var(--surface); border-radius: .7rem; padding: .85rem; margin: .85rem 0; }
.import-form label { display: block; font-weight: 650; }
.import-form div { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin: .4rem 0; }
.import-form input { max-width: 100%; }
.site-footer { border-top: 1px solid var(--border); background: white; padding: 1.3rem 0; color: var(--muted); }

@media (min-width: 88rem) { .products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 61.99rem) {
    .catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-filter-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; }
    .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .checkout { grid-template-columns: 1fr; }
}
@media (max-width: 49rem) {
    .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: .6rem 1rem; padding-block: .75rem; }
    .header-search { grid-area: 2 / 1 / auto / -1; }
    .hero-with-image { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
    .hero-visual { padding: .75rem; }
    .hero-visual img { height: 10rem; }
}
@media (max-width: 37rem) {
    .shell { width: calc(100% - 1.5rem); }
    .brand { font-size: 1rem; gap: .4rem; }
    .brand img { width: 2.5rem; height: 2.5rem; }
    nav { gap: .45rem; font-size: .9rem; }
    .site-header nav a:first-child { display: none; }
    .cart-link { padding: .45rem; }
    .hero-with-image { grid-template-columns: minmax(0, 1fr); }
    .hero-content { padding: 1.55rem; }
    .hero-visual { display: none; }
    .products { gap: .7rem; }
    .product-visual { height: 8.1rem; padding: .55rem; }
    .product-visual img { height: 7rem; }
    .product-body { padding: .7rem; }
    .product h3 { font-size: 1rem; }
    .product-actions button { padding: .35rem; font-size: .86rem; }
    .section-head, .footer-inner { align-items: flex-start; flex-direction: column; }
    .line-item { flex-wrap: wrap; }
}
@media (max-width: 23rem) { .products { grid-template-columns: minmax(0, 1fr); } }
.catalog-pages { justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
