:root {
  --paper: #ffffff;
  --paper-deep: #f1f1ee;
  --ink: #1d1d1b;
  --muted: #686861;
  --line: #d7d5cc;
  --white: #ffffff;
  --home: #355c68;
  --kids: #db694e;
  --shadow: 0 18px 45px rgba(35, 34, 30, 0.09);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  min-height: 100vh;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 100;
  padding: 0.75rem 1rem; color: var(--white); background: var(--ink); border-radius: 999px;
}
.skip-link:focus { top: 1rem; }

.site-header { padding: 1.5rem clamp(1rem, 4vw, 4rem) 1.75rem; }
.brand-shell {
  width: min(1440px, 100%); margin: 0 auto; display: grid;
  grid-template-columns: minmax(190px, 310px) 1fr; align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
}
.brand { display: block; width: min(100%, 290px); border-radius: 1rem; overflow: hidden; }
.brand img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.header-copy { padding-left: clamp(1rem, 4vw, 4rem); border-left: 1px solid var(--line); }
.eyebrow {
  margin: 0 0 0.45rem; color: var(--muted); font-size: 0.78rem; font-weight: 750;
  letter-spacing: 0.13em; text-transform: uppercase;
}
h1, h2, h3, p { text-wrap: balance; }
h1 {
  margin: 0; max-width: 820px; font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.3vw, 4.35rem); font-weight: 400;
  letter-spacing: -0.045em; line-height: 0.98;
}

.catalog-toolbar { position: sticky; top: 0; z-index: 20; padding: 0 clamp(0.75rem, 3vw, 3rem); }
.toolbar-inner {
  width: min(1440px, 100%); margin: 0 auto; padding: 0.85rem;
  display: grid; grid-template-columns: auto minmax(280px, 1fr); align-items: end; gap: 1rem;
  background: rgba(255, 255, 255, 0.86); border: 1px solid rgba(215, 213, 204, 0.85);
  border-radius: 1.4rem; box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.line-switcher { display: flex; gap: 0.35rem; padding: 0.3rem; background: var(--paper-deep); border-radius: 1rem; }
.line-button {
  min-height: 3.25rem; padding: 0.7rem 0.9rem; display: inline-flex; align-items: center;
  justify-content: center; gap: 0.48rem; color: var(--muted); background: transparent;
  border: 0; border-radius: 0.78rem; cursor: pointer; font-size: 0.9rem; font-weight: 700;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.line-button:hover { color: var(--ink); }
.line-button.is-active { color: var(--ink); background: var(--white); box-shadow: 0 5px 16px rgba(33, 33, 30, 0.08); }
.line-dot { width: 0.62rem; height: 0.62rem; border-radius: 50%; }
.dot-home { background: var(--home); }
.dot-kids { background: var(--kids); }
.line-total {
  min-width: 2rem; padding: 0.14rem 0.38rem; color: inherit; background: rgba(120, 120, 112, 0.12);
  border-radius: 999px; font-size: 0.72rem; line-height: 1.2;
}
.search-form label {
  display: block; margin: 0 0 0.35rem 0.2rem; color: var(--muted);
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em;
}
.search-field { position: relative; display: flex; align-items: center; }
.search-field > svg {
  position: absolute; left: 1rem; fill: none; stroke: currentColor; stroke-width: 1.7;
  color: var(--muted); pointer-events: none;
}
.search-field input {
  width: 100%; min-height: 3.45rem; padding: 0.8rem 3.25rem 0.8rem 3.15rem;
  color: var(--ink); background: var(--white); border: 1px solid var(--line);
  border-radius: 0.9rem; outline: none; font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.search-field input::placeholder { color: #92918a; }
.search-field input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 29, 27, 0.08); }
.clear-search {
  position: absolute; right: 0.72rem; width: 2.15rem; height: 2.15rem; display: grid;
  place-items: center; color: var(--muted); background: var(--paper-deep); border: 0;
  border-radius: 50%; cursor: pointer;
}
.clear-search svg, .back-to-top svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.results-shell { width: min(1440px, 100%); margin: 0 auto; padding: clamp(2.25rem, 5vw, 4.5rem) clamp(1rem, 4vw, 4rem) 5rem; }
.results-heading { margin-bottom: 1.5rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.results-heading h2 {
  margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.85rem, 3vw, 3.2rem);
  font-weight: 400; letter-spacing: -0.035em; line-height: 1;
}
.results-count { margin: 0; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(0.85rem, 1.7vw, 1.6rem); }
.product-card { min-width: 0; animation: card-in 360ms both; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.product-link { height: 100%; display: flex; flex-direction: column; color: inherit; text-decoration: none; outline: none; }
.product-image-wrap {
  position: relative; aspect-ratio: 1; overflow: hidden; background: #ecebe6;
  border: 1px solid rgba(29, 29, 27, 0.08); border-radius: 0;
  -webkit-touch-callout: none;
  user-select: none;
}
.product-image {
  width: 100%; height: 100%; display: block; object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  transition: transform 420ms cubic-bezier(.2,.7,.2,1), filter 250ms ease;
}
.product-badge {
  position: absolute; left: 0.65rem; top: 0.65rem; padding: 0.34rem 0.58rem;
  color: var(--ink); background: rgba(255, 255, 255, 0.89); border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px; box-shadow: 0 4px 14px rgba(20, 20, 18, 0.08);
  backdrop-filter: blur(7px); font-size: 0.72rem; font-weight: 750;
}
.product-open {
  position: absolute; right: 0.65rem; bottom: 0.65rem; width: 2.35rem; height: 2.35rem;
  display: grid; place-items: center; color: var(--white); background: var(--ink); border-radius: 50%;
  opacity: 0; transform: translateY(5px); transition: opacity 180ms ease, transform 180ms ease;
}
.product-open svg {
  width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round;
  stroke-linejoin: round; stroke-width: 1.8;
}
.product-copy { padding: 0.8rem 0.2rem 0.4rem; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 0.65rem; }
.product-code {
  margin: 0; padding-top: 0.1rem; color: var(--muted); font-size: 0.75rem;
  font-weight: 800; letter-spacing: 0.06em; line-height: 1.35;
}
.product-name { margin: 0; font-size: 0.94rem; font-weight: 650; line-height: 1.3; }
.product-link:hover .product-image, .product-link:focus-visible .product-image { transform: scale(1.035); }
.product-link:hover .product-open, .product-link:focus-visible .product-open { opacity: 1; transform: translateY(0); }
.product-link:focus-visible .product-image-wrap { outline: 3px solid var(--ink); outline-offset: 3px; }

.empty-state { padding: clamp(3rem, 8vw, 7rem) 1rem; text-align: center; }
.empty-mark {
  width: 4rem; height: 4rem; margin: 0 auto 1rem; display: grid; place-items: center;
  color: var(--muted); border: 1px solid var(--line); border-radius: 50%; font-family: Georgia, serif; font-size: 1.6rem;
}
.empty-state h3 { margin: 0; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 400; }
.empty-state p { margin: 0.5rem auto 1.25rem; max-width: 34rem; color: var(--muted); }
.empty-state button, .load-more {
  min-height: 3rem; padding: 0.75rem 1.15rem; color: var(--white); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px; cursor: pointer; font-weight: 750;
}
.load-more-wrap {
  padding: 2.5rem 0 0; display: flex; flex-direction: column; align-items: center;
  gap: 0.7rem; color: var(--muted); font-size: 0.82rem;
}
.load-more { min-width: 10rem; color: var(--ink); background: transparent; }
.load-more:hover { color: var(--white); background: var(--ink); }
#scroll-sentinel { height: 1px; }

footer {
  padding: 2.5rem clamp(1rem, 4vw, 4rem) 3rem; display: flex; align-items: center;
  justify-content: center; flex-wrap: wrap; gap: 0.75rem 1.5rem; color: var(--muted);
  background: var(--white); border-top: 1px solid var(--line); font-size: 0.85rem;
}
footer img { width: 7rem; height: auto; mix-blend-mode: multiply; }
footer p { margin: 0; }
footer a { color: var(--ink); text-underline-offset: 0.2em; }
.back-to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 25; width: 3rem; height: 3rem;
  display: grid; place-items: center; color: var(--white); background: var(--ink); border: 0;
  border-radius: 50%; box-shadow: var(--shadow); cursor: pointer; opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: opacity 180ms ease, transform 180ms ease;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

@media (max-width: 1180px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .brand-shell { grid-template-columns: 190px 1fr; }
  .toolbar-inner { grid-template-columns: 1fr; align-items: stretch; }
  .line-switcher { width: 100%; }
  .line-button { flex: 1; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .site-header { padding: 1rem 1rem 1.35rem; }
  .brand-shell { grid-template-columns: 7.5rem 1fr; gap: 1rem; }
  .header-copy { padding-left: 1rem; }
  .header-copy .eyebrow { display: none; }
  h1 { font-size: clamp(1.55rem, 7vw, 2.2rem); }
  .catalog-toolbar { padding: 0 0.6rem; }
  .toolbar-inner { padding: 0.6rem; gap: 0.65rem; border-radius: 1.1rem; }
  .line-switcher { gap: 0.2rem; }
  .line-button { min-width: 0; min-height: 2.8rem; padding: 0.55rem 0.45rem; font-size: 0.82rem; }
  .line-total { min-width: auto; }
  .search-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .search-field input { min-height: 3rem; }
  .results-shell { padding: 2.2rem 0.8rem 4rem; }
  .results-heading { align-items: start; }
  .results-count { padding-top: 0.3rem; font-size: 0.8rem; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 0.65rem; }
  .product-image-wrap { border-radius: 0.9rem; }
  .product-copy { grid-template-columns: 1fr; gap: 0.14rem; padding: 0.65rem 0.12rem 0.45rem; }
  .product-name { font-size: 0.86rem; }
  .product-open { opacity: 0.92; transform: none; width: 2rem; height: 2rem; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important; animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important; transition-duration: 0.01ms !important;
  }
}
