/* Kagaz Books — formal catalogue bookshop
   Cream paper, deep green, fine rules.  */

:root {
  --paper: #FAF8F3;
  --paper-2: #F2EFE7;
  --white: #FFFFFF;
  --ink: #16201B;
  --forest: #13352A;
  --forest-2: #1D4A39;
  --muted: #5B665F;
  --rule: #DFDBD0;
  --rule-2: #C7C1B2;
  --gold: #9C7A33;

  --display: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1220px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.015em;
  margin: 0;
  line-height: 1.12;
}

p { margin: 0; }

button, input, select { font: inherit; color: inherit; }

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--forest-2);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--forest);
  color: var(--paper);
  padding: .7rem 1rem;
  text-decoration: none;
  font-size: .9rem;
}
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0 1.35rem;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.btn-solid {
  background: var(--forest);
  color: var(--paper);
  border-color: var(--forest);
}
.btn-solid:hover { background: var(--forest-2); border-color: var(--forest-2); }

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}
.btn-line:hover { border-color: var(--forest); }

/* ---------- Utility bar ---------- */

.utility {
  background: var(--forest);
  color: #E8E4D8;
  font-size: .78rem;
  letter-spacing: .01em;
}

.utility-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  min-height: 2.35rem;
  flex-wrap: wrap;
  padding-block: .35rem;
}

.utility-right {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #BCC6BE;
}

.utility a { text-decoration: none; color: #E8E4D8; }
.utility a:hover { text-decoration: underline; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  min-height: 5.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  color: var(--forest);
}
.brand-mark svg { width: 1.9rem; height: 1.9rem; }

.brand-text { display: block; }

.brand-name {
  display: block;
  font-family: var(--display);
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.brand-sub {
  display: block;
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .01em;
  margin-top: .12rem;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 1.8vw, 1.75rem);
  margin-left: .5rem;
}

.site-nav a {
  font-size: .9rem;
  text-decoration: none;
  color: var(--ink);
  padding-block: .4rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--ink); }

.search {
  display: flex;
  align-items: center;
  margin-left: auto;
  border: 1px solid var(--rule-2);
  background: var(--white);
  min-width: 0;
  flex: 0 1 15rem;
}

.search input {
  border: 0;
  background: transparent;
  padding: .55rem .8rem;
  font-size: .88rem;
  width: 100%;
  min-width: 0;
}
.search input:focus { outline: 2px solid var(--forest-2); outline-offset: -2px; }
.search input::placeholder { color: #8A918B; }

.search button {
  border: 0;
  background: transparent;
  padding: .5rem .7rem;
  color: var(--forest);
  display: grid;
  place-items: center;
}
.search button svg { width: 1.05rem; height: 1.05rem; }

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: transparent;
  border: 1px solid var(--rule-2);
  padding: .5rem .6rem .5rem .9rem;
  font-size: .88rem;
  flex-shrink: 0;
}
.cart-btn:hover { border-color: var(--forest); }

.cart-count {
  display: grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding-inline: .3rem;
  background: var(--forest);
  color: var(--paper);
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
}

.menu-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--rule-2);
  background: transparent;
  padding: 0;
  place-items: center;
  gap: .3rem;
  flex-shrink: 0;
}
.menu-bar {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: var(--ink);
}
.menu-bar + .menu-bar { margin-top: .3rem; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--rule);
  background: var(--white);
}
.mobile-nav a {
  display: block;
  padding: .95rem clamp(1.15rem, 4vw, 2.5rem);
  text-decoration: none;
  font-size: .95rem;
  border-bottom: 1px solid var(--rule);
}

/* ---------- Intro ---------- */

.intro {
  padding-block: clamp(3rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.eyebrow {
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

.intro h1 {
  font-size: clamp(2.35rem, 4.4vw, 3.7rem);
  max-width: 22ch;
}

.intro-lede {
  margin-top: 1.4rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.intro-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem 2rem;
  margin: 2.75rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.intro-facts dt {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .3rem;
}
.intro-facts dd {
  margin: 0;
  font-size: .9rem;
  line-height: 1.45;
}

.visit-card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: clamp(1.35rem, 2.6vw, 2rem);
}

.visit-card h2 {
  font-size: 1.45rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.visit-list { margin: 0; }
.visit-list > div {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: .85rem;
  border-bottom: 1px solid var(--rule);
}
.visit-list dt {
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .18rem;
}
.visit-list dd {
  margin: 0;
  font-size: .9rem;
  line-height: 1.5;
}
.visit-list a { text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.visit-list a:hover { border-bottom-color: var(--ink); }

.visit-note {
  margin-top: 1rem;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Services ---------- */

.services {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(1.75rem, 3vw, 2.75rem);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
}

.service h2 {
  font-size: 1.02rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -.005em;
  margin-bottom: .45rem;
}

.service p {
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- Catalogue ---------- */

.catalogue { padding-block: clamp(3rem, 6vw, 4.5rem); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.section-head p {
  margin-top: .55rem;
  font-size: .9rem;
  color: var(--muted);
  max-width: 34rem;
}

.catalogue-layout {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
}

.filters {
  position: sticky;
  top: 6.5rem;
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
}

.filters h3 {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.filter-group {
  border: 0;
  padding: 0;
  margin: 0 0 1.5rem;
}

.filter-group legend {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  margin-bottom: .6rem;
}

.radio, .check {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .9rem;
  padding-block: .28rem;
  cursor: pointer;
}

.radio input, .check input {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--rule-2);
  background: var(--white);
  margin: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.radio input { border-radius: 50%; }

.radio input::after {
  content: "";
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--forest);
  transform: scale(0);
  transition: transform .12s ease;
}
.radio input:checked { border-color: var(--forest); }
.radio input:checked::after { transform: scale(1); }

.check input::after {
  content: "";
  width: .5rem;
  height: .3rem;
  border-left: 1.5px solid var(--paper);
  border-bottom: 1.5px solid var(--paper);
  transform: rotate(-45deg) scale(0);
}
.check input:checked { background: var(--forest); border-color: var(--forest); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }

.radio input:focus-visible, .check input:focus-visible {
  outline: 2px solid var(--forest-2);
  outline-offset: 2px;
}

.btn-clear {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-2);
  padding: 0 0 .15rem;
  font-size: .84rem;
  color: var(--muted);
}
.btn-clear:hover { color: var(--ink); border-bottom-color: var(--ink); }

.catalogue-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}

.result-count {
  font-size: .84rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sort {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .84rem;
  color: var(--muted);
}

.sort select {
  border: 1px solid var(--rule-2);
  background: var(--white);
  padding: .35rem 1.8rem .35rem .55rem;
  font-size: .84rem;
  color: var(--ink);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235B665F' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .55rem center;
  background-size: .6rem;
}

/* ---------- Products ---------- */

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.product {
  background: var(--white);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}

.p-cover {
  background: var(--paper-2);
  padding: 1.35rem 1.35rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 15.5rem;
  border-bottom: 1px solid var(--rule);
}

.p-cover img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  box-shadow: 0 4px 14px rgba(22, 32, 27, .13);
}

.p-body {
  padding: 1rem 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.p-cat {
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .45rem;
}

.p-body h3 {
  font-size: 1.08rem;
  line-height: 1.25;
}

.p-author {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .25rem;
}

.p-stock {
  font-size: .76rem;
  color: #2E6A4F;
  margin-top: .7rem;
}
.p-stock.is-low { color: #8A5A1F; }

.p-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: auto;
  padding-top: .9rem;
}

.p-price {
  font-size: .95rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.btn-add {
  background: transparent;
  border: 1px solid var(--ink);
  padding: .35rem .85rem;
  font-size: .8rem;
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
.btn-add:hover { background: var(--ink); color: var(--paper); }

.empty {
  border: 1px solid var(--rule);
  background: var(--white);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.empty p { color: var(--muted); margin-bottom: 1rem; }

/* ---------- Bestsellers ---------- */

.bestsellers {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--rule);
}

.bs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.bs-table thead th {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--ink);
}

.bs-table tbody td {
  padding-block: .95rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}

.bs-table tbody tr:hover { background: rgba(255, 255, 255, .65); }

.bs-rank {
  width: 3.5rem;
  font-family: var(--display);
  font-size: 1rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.bs-title {
  display: block;
  font-family: var(--display);
  font-size: 1.08rem;
  line-height: 1.3;
}
.bs-author {
  display: block;
  font-size: .82rem;
  color: var(--muted);
  margin-top: .1rem;
}

.bs-cat { font-size: .84rem; color: var(--muted); width: 11rem; }

.bs-price {
  text-align: right;
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
  width: 8rem;
  padding-right: 1.5rem;
}

.bs-buy { width: 5rem; text-align: right; }

/* ---------- About ---------- */

.about {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 1.25rem; }

.about p {
  font-size: .96rem;
  color: #3C4640;
  max-width: 38rem;
}
.about p + p { margin-top: 1rem; }

.about-facts {
  margin: 0;
  border-top: 1px solid var(--rule-2);
}
.about-facts > div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: .85rem;
  border-bottom: 1px solid var(--rule-2);
}
.about-facts dt {
  font-size: .72rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .2rem;
}
.about-facts dd { margin: 0; font-size: .92rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--forest);
  color: #DCE0D8;
  padding-block: clamp(2.75rem, 5vw, 4rem) 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}

.footer-name {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: .7rem;
}

.footer-line {
  font-size: .86rem;
  color: #A9B6AC;
  max-width: 20rem;
  line-height: 1.55;
}

.footer-col h2 {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #93A398;
  margin-bottom: .85rem;
}

.footer-col p {
  font-size: .86rem;
  line-height: 1.6;
  color: #C4CDC4;
}
.footer-col p + p { margin-top: .35rem; }

.footer-col a {
  text-decoration: none;
  border-bottom: 1px solid rgba(220, 224, 216, .25);
}
.footer-col a:hover { border-bottom-color: var(--paper); }

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(220, 224, 216, .18);
  font-size: .76rem;
  color: #93A398;
}

/* ---------- Cart ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 20, .5);
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 60;
}
.overlay.is-visible { opacity: 1; }

.cart {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(25rem, 100%);
  background: var(--white);
  z-index: 70;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: -12px 0 40px rgba(16, 24, 20, .16);
}
.cart.is-open { transform: translateX(0); }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid var(--rule);
}
.cart-head h2 { font-size: 1.35rem; }

.cart-close {
  background: transparent;
  border: 1px solid var(--rule);
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.cart-close svg { width: .95rem; height: .95rem; }
.cart-close:hover { border-color: var(--ink); }

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.35rem;
}

.cart-empty {
  font-size: .9rem;
  color: var(--muted);
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: .9rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.cart-item img {
  width: 3rem;
  height: 4rem;
  object-fit: contain;
  background: var(--paper-2);
}

.cart-item-title { font-family: var(--display); font-size: 1rem; line-height: 1.25; }
.cart-item-author { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.cart-item-price {
  font-size: .8rem;
  color: var(--muted);
  margin-top: .35rem;
  font-variant-numeric: tabular-nums;
}

.cart-remove {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: .76rem;
  color: var(--muted);
  border-bottom: 1px solid var(--rule-2);
}
.cart-remove:hover { color: var(--ink); border-bottom-color: var(--ink); }

.cart-foot {
  padding: 1.25rem 1.35rem 1.4rem;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}

.cart-row {
  display: flex;
  justify-content: space-between;
  font-size: .98rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.cart-ship {
  font-size: .8rem;
  color: var(--muted);
  margin-top: .4rem;
}

.cart-checkout {
  width: 100%;
  margin-top: 1.1rem;
}
.cart-checkout:disabled {
  background: #B9C2BB;
  border-color: #B9C2BB;
  cursor: not-allowed;
}

.cart-small {
  font-size: .74rem;
  color: var(--muted);
  margin-top: .7rem;
  text-align: center;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 1rem);
  background: var(--forest);
  color: var(--paper);
  padding: .7rem 1.1rem;
  font-size: .86rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 80;
  max-width: calc(100vw - 2rem);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .site-nav { display: none; }
  .menu-toggle { display: grid; }
  .mobile-nav.is-open { display: block; }
  .search { flex: 1 1 auto; max-width: 18rem; }
}

@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 2rem; }
  .catalogue-layout { grid-template-columns: 1fr; }
  .filters {
    position: static;
    border-top: 0;
    border-bottom: 1px solid var(--rule);
    padding: 0 0 1rem;
  }
  .filter-group {
    margin-bottom: .75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem 1.25rem;
  }
  .filter-group legend { width: 100%; margin-bottom: .35rem; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .utility-inner { justify-content: center; text-align: center; }
  .utility-right { display: none; }
  .header-inner { min-height: 4.4rem; gap: .75rem; }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.25rem; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .search input { padding-block: .45rem; }
  .header-inner { flex-wrap: wrap; padding-block: .7rem .65rem; }
  html { scroll-padding-top: 8.6rem; }
  .cart-btn { margin-left: auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-cover { height: 13rem; padding: 1rem; }
  .bs-cat { display: none; }
  .bs-price { width: 6.5rem; padding-right: .75rem; }
  .bs-table thead th.bs-cat { display: none; }
  .intro-facts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .intro h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .grid { gap: .85rem; }
  .p-cover { height: 11.5rem; padding: .85rem; }
  .p-body { padding: .8rem .85rem .9rem; }
  .p-body h3 { font-size: .95rem; }
  .p-author, .p-stock { font-size: .78rem; }
  .btn-add { padding: .3rem .65rem; font-size: .76rem; }
  .services-grid { grid-template-columns: 1fr; gap: 1.35rem; }
  .intro-facts { grid-template-columns: 1fr; gap: 1rem; }
  .visit-list > div { grid-template-columns: 1fr; gap: .2rem; }
  .visit-list dd { padding-bottom: .2rem; }
  .about-facts > div { grid-template-columns: 1fr; gap: .2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .bs-rank { width: 2.5rem; }
  .bs-title { font-size: 1rem; }
  .bs-price { width: 5.5rem; font-size: .86rem; }
  .bs-buy { width: 3.5rem; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .catalogue-bar { gap: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
