:root {
  --ink: #1c292c;
  --muted: #647175;
  --paper: #f7f8f6;
  --surface: #ffffff;
  --line: #dce4e4;
  --deep: #153f47;
  --accent: #e68e71;
  --mist: #e9f0ef;
  --display: "Fraunces", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 14px/1.7 var(--sans); }
body.cart-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: 0; }

.announcement {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 18px;
  min-height: 35px; padding: 7px 22px; color: #153f47; background: #dcebe6;
  font-size: 10px; font-weight: 800;
}
.announcement a { border-bottom: 1px solid currentColor; font-weight: 700; }
.announcement a span { margin-left: 4px; font-size: 13px; }

.site-header {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; min-height: 82px; padding: 0 max(28px, calc((100% - 1280px) / 2));
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; }
.brand-mark { display: block; width: 42px; height: 42px; flex: 0 0 auto; }
.brand-name { color: var(--deep); font-size: 17px; font-weight: 800; line-height: 1.1; }
.brand-subtitle { display: block; margin-top: 5px; color: #728185; font-size: 8px; font-weight: 800; }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a { color: #405358; font-size: 11px; font-weight: 800; }
.main-nav a:hover { color: #bf6249; }
.cart-trigger {
  justify-self: end; display: inline-flex; align-items: center; gap: 13px; min-height: 38px;
  padding: 7px 9px 7px 15px; border: 1px solid var(--deep); border-radius: 3px;
  background: var(--deep); color: white; font-size: 11px; font-weight: 800;
}
.cart-trigger:hover { background: #24606a; }
.cart-count { display: grid; place-items: center; min-width: 23px; height: 23px; padding: 0 4px; border-radius: 2px; background: var(--accent); color: #17363a; font-size: 10px; }

.hero {
  position: relative; isolation: isolate; display: flex; align-items: center;
  min-height: min(660px, calc(100svh - 165px)); padding: 70px max(28px, calc((100% - 1280px) / 2));
  overflow: hidden; color: #fff; background: #1f2626;
}
.hero-media { position: absolute; inset: 0; z-index: -2; background: url("./assets/bookstore-hero.png") center 54% / cover; }
.hero::before { position: absolute; inset: 0; z-index: -1; content: ""; background: linear-gradient(90deg, rgba(13,23,24,.68), rgba(13,23,24,.3) 48%, transparent 78%); }
.hero-inner { max-width: 650px; }
.eyebrow { margin: 0 0 23px; color: #dbebe6; font-size: 10px; font-weight: 800; text-transform: uppercase; }
h1 { margin-bottom: 24px; font-size: 102px; line-height: .94; }
.hero-inner > p:not(.eyebrow) { max-width: 425px; margin-bottom: 30px; color: #ecf1ee; font-size: 15px; font-weight: 500; line-height: 1.8; }
.hero-link {
  display: inline-flex; align-items: center; gap: 24px; min-height: 47px; padding: 12px 17px;
  border-radius: 3px; background: var(--accent); color: #172b2e; font-size: 11px; font-weight: 800;
}
.hero-link:hover { background: #f2a58a; }
.hero-link span { font-size: 18px; font-weight: 400; line-height: 1; }
.hero-caption { position: absolute; right: max(28px, calc((100% - 1280px) / 2)); bottom: 27px; color: #f0f1e9; font-size: 9px; font-weight: 800; }

.intro, .catalog-section, .info-section, .contact-section {
  scroll-margin-top: 98px;
  padding-inline: max(28px, calc((100% - 1280px) / 2));
}
.section-label { margin: 0 0 18px; color: #bb634d; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.intro {
  display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: start;
  padding-block: 104px 112px; background: var(--mist);
}
.intro h2 { max-width: 700px; margin-bottom: 22px; font-size: 57px; line-height: 1.12; }
.intro > div > p { max-width: 660px; margin: 0; color: #546b6c; font-size: 15px; line-height: 1.9; }

.catalog-section { padding-block: 98px 115px; background: var(--surface); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 34px; }
.section-head h2 { margin: 0; font-size: 59px; line-height: 1.1; }
.section-head > p { margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.catalog-toolbar { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 12px; padding: 19px; border: 1px solid var(--line); border-radius: 4px; background: #f8faf9; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field span { color: #5b6e72; font-size: 10px; font-weight: 800; }
.field input, .field select {
  width: 100%; height: 44px; padding: 0 13px; border: 1px solid #cddada; border-radius: 3px;
  background: white; color: var(--ink); font-size: 12px; appearance: none;
}
.field input::placeholder { color: #849195; }
.field select {
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23153f47' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right 13px center; background-repeat: no-repeat;
}
.result-count { margin: 20px 0 20px; color: var(--muted); font-size: 11px; font-weight: 700; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px; }
.book-card {
  display: flex; flex-direction: column; min-width: 0; padding: 28px;
  border: 1px solid #e3e8e5; border-radius: 4px; background: #f5f7f5;
}
.book-cover {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  width: min(70%, 242px); aspect-ratio: 2 / 3; margin: 0 auto 26px; padding: 18px;
  overflow: hidden; box-shadow: -9px 12px 16px rgba(26,35,37,.18), inset 7px 0 8px rgba(0,0,0,.12);
}
.book-cover::before { position: absolute; inset: 0 auto 0 9px; width: 1px; background: rgba(255,255,255,.25); content: ""; }
.book-cover::after { position: absolute; right: -17%; bottom: -18%; width: 82%; aspect-ratio: 1; border: 1px solid currentColor; border-radius: 50%; opacity: .33; content: ""; }
.cover-edition { position: relative; z-index: 1; font-size: 8px; font-weight: 800; line-height: 1.4; }
.cover-title { position: relative; z-index: 1; max-width: 100%; margin: auto 0 18px; font: 500 39px/1 var(--display); overflow-wrap: anywhere; }
.cover-author { position: relative; z-index: 1; font-size: 10px; font-weight: 700; line-height: 1.4; }
.cover-lalka { color: #fff; background: #163d47; }
.cover-duma { color: #fff; background: #ba6b55; }
.cover-ksiaze { color: #21394a; background: #d8e6df; }
.cover-zbrodnia { color: #fff; background: #3c465b; }
.cover-proces { color: #213235; background: #e4bf8e; }
.cover-tadeusz { color: #fff; background: #677a73; }
.cover-duma::after { width: 120%; right: -45%; bottom: -42%; }
.cover-ksiaze::after { width: 58%; right: 9%; bottom: 19%; opacity: .6; }
.cover-zbrodnia::after { border-radius: 0; transform: rotate(45deg); }
.cover-proces::after { width: 59%; right: 10%; bottom: 20%; border-radius: 0; }
.cover-tadeusz::after { width: 140%; right: -50%; bottom: -72%; }
.book-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; color: #a95e4b; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.book-card h3 { margin: 0 0 3px; font-size: 26px; line-height: 1.2; }
.book-author { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.book-purchase { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid #dce3df; }
.book-purchase strong { font-size: 14px; font-weight: 800; }
.add-button { display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; border: 0; background: transparent; color: var(--deep); font-size: 11px; font-weight: 800; }
.add-button span { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid var(--deep); border-radius: 2px; font-size: 17px; font-weight: 400; line-height: 1; }
.add-button:hover { color: #ae593f; }
.add-button:hover span { border-color: #ae593f; }
.empty-results { padding: 30px; border: 1px solid var(--line); color: var(--muted); text-align: center; }
.catalog-note { margin: 25px 0 0; color: var(--muted); font-size: 10px; }

.quote-section { display: grid; place-items: center; gap: 7px; min-height: 290px; padding: 55px 25px; background: var(--accent); color: #14353b; text-align: center; }
.quote-section p { max-width: 800px; margin: 0; font: 500 44px/1.16 var(--display); }
.quote-section span { font-size: 10px; font-weight: 800; }
.info-section { padding-block: 105px 115px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.info-grid > div { min-height: 205px; padding: 28px 31px; border-right: 1px solid var(--line); }
.info-grid > div:first-child { padding-left: 0; }
.info-grid > div:last-child { border-right: 0; }
.info-grid span { color: #b76049; font-size: 11px; font-weight: 800; }
.info-grid h3 { margin: 30px 0 9px; font-size: 28px; }
.info-grid p { max-width: 300px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

.contact-section {
  display: grid; grid-template-columns: 1fr 1fr; gap: 70px; padding-block: 100px 115px;
  background: var(--deep); color: white;
}
.contact-section .section-label { color: #f1ac93; }
.contact-section h2 { margin: 0; font-size: 61px; line-height: 1.06; }
.contact-section > div:last-child { align-self: end; }
.contact-section > div:last-child > p:first-child { color: #c9dbdc; font-size: 13px; }
.contact-section a { font: 500 35px/1.2 var(--display); overflow-wrap: anywhere; }
.contact-section a:hover { color: #f3ac91; }
.contact-address { margin-top: 31px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.25); }
.contact-address span { display: block; margin-bottom: 9px; color: #f1ac93; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.contact-address address { color: #d5e4e4; font-size: 13px; font-style: normal; line-height: 1.7; }
.domain { margin: 25px 0 0; color: #a8c1c3; font-size: 11px; font-weight: 700; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 25px max(28px, calc((100% - 1280px) / 2)); color: var(--muted); font-size: 11px; }
.site-footer a:hover { color: var(--deep); }

.cart-backdrop { position: fixed; inset: 0; z-index: 29; background: rgba(15,31,34,.57); }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; display: flex; flex-direction: column;
  width: min(460px, 100%); padding: 28px 30px; background: var(--surface); box-shadow: -12px 0 40px rgba(0,0,0,.14);
  transform: translateX(102%); transition: transform .25s ease;
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.cart-head h2 { margin: 0; font-size: 43px; line-height: 1; }
.cart-head .section-label { margin-bottom: 8px; }
.cart-close { align-self: start; border: 0; background: transparent; color: var(--ink); font-size: 32px; line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; }
.cart-empty { padding: 45px 0; color: var(--muted); font-size: 12px; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cart-item h3 { margin: 0 0 5px; font-size: 24px; }
.cart-item p { margin: 0; color: var(--muted); font-size: 11px; }
.cart-item > strong { font-size: 12px; white-space: nowrap; }
.qty-controls { display: inline-flex; align-items: center; gap: 15px; margin-top: 15px; }
.qty-controls button { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 2px; background: white; color: var(--ink); }
.qty-controls span { min-width: 12px; text-align: center; font-size: 12px; }
.cart-bottom { padding-top: 20px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; gap: 15px; font-size: 14px; font-weight: 800; }
.cart-bottom p { margin: 11px 0 20px; color: var(--muted); font-size: 11px; }
.checkout-button { width: 100%; min-height: 48px; padding: 12px; border: 0; border-radius: 3px; background: var(--deep); color: white; font-size: 11px; font-weight: 800; }
.checkout-button:hover:not(:disabled) { background: #24606a; }
.checkout-button:disabled { cursor: not-allowed; opacity: .45; }

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 1fr auto; row-gap: 0; padding: 13px 28px 11px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; gap: 28px; overflow-x: auto; padding-top: 13px; white-space: nowrap; }
  .intro, .contact-section { gap: 35px; }
  .book-card { padding: 19px; }
}
@media (max-width: 760px) {
  .site-header { padding-inline: 20px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 15px; }
  .main-nav { gap: 22px; }
  .hero { min-height: min(630px, 76svh); padding: 68px 20px; align-items: end; }
  .hero-media { background-position: 49% center; }
  .hero::before { background: linear-gradient(0deg, rgba(13,23,24,.88), rgba(13,23,24,.12) 78%); }
  h1 { font-size: 76px; }
  .hero-inner > p:not(.eyebrow) { font-size: 14px; }
  .hero-caption { display: none; }
  .intro, .catalog-section, .info-section, .contact-section { padding-inline: 20px; }
  .intro { grid-template-columns: 1fr; gap: 13px; padding-block: 76px 86px; }
  .intro h2 { font-size: 44px; }
  .catalog-section, .info-section { padding-block: 78px 90px; }
  .section-head { display: block; margin-bottom: 27px; }
  .section-head h2 { font-size: 47px; }
  .section-head > p { margin-top: 11px; }
  .catalog-toolbar { grid-template-columns: 1fr 1fr; padding: 12px; }
  .search-field { grid-column: 1 / -1; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .book-card { padding: 15px; }
  .book-cover { width: min(82%, 230px); margin-bottom: 19px; padding: 13px; }
  .cover-title { font-size: 27px; }
  .cover-edition { font-size: 7px; }
  .cover-author { font-size: 8px; }
  .book-card h3 { font-size: 23px; }
  .quote-section { min-height: 250px; }
  .quote-section p { font-size: 33px; }
  .info-grid { grid-template-columns: 1fr; }
  .info-grid > div, .info-grid > div:first-child { min-height: 0; padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .info-grid > div:last-child { border-bottom: 0; }
  .info-grid h3 { margin-top: 14px; }
  .contact-section { grid-template-columns: 1fr; gap: 42px; padding-block: 79px 85px; }
  .contact-section h2 { font-size: 48px; }
  .contact-section a { font-size: 29px; }
  .site-footer { flex-wrap: wrap; padding-inline: 20px; }
}
@media (max-width: 520px) {
  .announcement { gap: 4px 9px; font-size: 9px; }
  .book-grid { grid-template-columns: 1fr; gap: 18px; }
  .book-card { padding: 23px; }
  .book-cover { width: min(70%, 225px); padding: 17px; }
  .cover-title { font-size: 34px; }
  .cover-edition { font-size: 8px; }
  .cover-author { font-size: 10px; }
  .book-card h3 { font-size: 26px; }
}
@media (max-width: 380px) {
  h1 { font-size: 62px; }
  .brand-name { font-size: 13px; }
  .brand-subtitle { font-size: 7px; }
  .cart-trigger { gap: 6px; padding-left: 9px; }
  .contact-section a { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cart-drawer { transition: none; }
}
