:root {
  --cream: #faf6ed;
  --paper: #fffcf5;
  --ink: #2d251c;
  --muted: #655749;
  --accent: #81552b;
  --gold: #e7c88c;
  --line: #e2d6c1;
  --dark: #33261e;
  --display: "Noto Serif Hebrew", "Times New Roman", serif;
  color: var(--ink);
  background: var(--cream);
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 2px solid #a87b3d; outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(1216px, calc(100% - 64px)); margin-inline: auto; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
  border: 0;
}

.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.nav { min-height: 77px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.54rem; }
.brand img { object-fit: contain; }
nav { display: flex; gap: clamp(8px, 2.15vw, 27px); flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 700; }
nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(360px, auto) auto;
  overflow: hidden;
  isolation: isolate;
  border-radius: 25px;
  margin-top: 31px;
  position: relative;
  background: radial-gradient(ellipse at 24% 45%, #694933 0%, #412e22 43%, var(--dark) 77%);
  color: #fff9ec;
}
.intro { position: relative; z-index: 2; align-self: center; padding: 44px clamp(27px, 5.6vw, 74px) 51px 8px; }
.eyebrow { color: var(--gold); font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 9px; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--gold); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; }
h1 { margin-block: 4px 13px; color: #fff8e9; font-size: clamp(3.25rem, 7vw, 6.2rem); letter-spacing: -.05em; line-height: .98; }
.hero-description { color: #f3e6d3; max-width: 420px; font-size: clamp(1.08rem, 2.1vw, 1.32rem); line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 42px;
  padding: 6px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: .93rem;
  font-weight: 700;
}
.button-gold { background: var(--gold); color: #372819; }
.button-gold:hover { background: #f3d8a2; }
.button-quiet { color: #fff6e4; border-color: #98795b; }
.button-quiet:hover { background: #fff0d423; }
.outline { background: transparent; border-color: #bca382; color: var(--accent); }
.outline:hover { background: #f2e9d7; }
.book-display { position: relative; align-self: stretch; min-width: 0; pointer-events: none; }
.book-display::before {
  content: "";
  position: absolute;
  inset: 12% 10%;
  border: 1px solid #a17a4d59;
  border-radius: 50%;
  transform: rotate(-15deg);
}
.book {
  position: absolute;
  width: clamp(125px, 17vw, 205px);
  height: auto;
  max-height: 76%;
  object-fit: cover;
  inset-block-start: 12%;
  border-radius: 3px 8px 8px 3px;
  box-shadow: -7px 10px 22px #1d150faf;
  border: 1px solid #b69f80;
  user-select: none;
}
.book-back { inset-inline-start: 8%; transform: rotate(15deg); }
.book-front { inset-inline-start: 30%; transform: rotate(-5deg); z-index: 1; border-color: #dcc08a; }
.book-side { inset-inline-start: 56%; transform: rotate(-15deg); inset-block-start: 16%; }

.hero-bundle {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(208px, .7fr) minmax(0, 1.65fr);
  align-items: center;
  gap: clamp(14px, 4vw, 45px);
  padding: 17px clamp(20px, 5.6vw, 74px);
  background: #f5e8cc;
  border-top: 1px solid #d7b97f;
  color: var(--ink);
}
.hero-offer h2 { font-size: clamp(1.42rem, 2.6vw, 2.04rem); }
.hero-offer p { color: var(--muted); font-size: .91rem; }
.hero-offer-price {
  display: inline-block;
  margin-block: 3px 4px;
  color: #57381f;
  font-size: clamp(1.83rem, 3.3vw, 2.55rem);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.hero-offer-price:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-cover-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-items: center;
  gap: clamp(6px, 1.6vw, 20px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.hero-cover-list li { width: 100%; max-width: 95px; }
.hero-cover-list a {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: clamp(.72rem, 1.3vw, .92rem);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.hero-cover-list a:hover { color: var(--accent); text-decoration: underline; }
.hero-cover-list img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px 4px 4px 2px;
  box-shadow: 0 3px 8px #4b34274d;
  user-select: none;
}

.section { padding-block: 48px; scroll-margin-top: 10px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 13px; margin-bottom: 17px; }
h2 { font-size: clamp(1.95rem, 3vw, 2.65rem); line-height: 1.12; letter-spacing: -.025em; }
.section-head p, .leaflets p, .contact p { color: var(--muted); margin-top: 5px; }
.search { width: min(100%, 300px); flex-shrink: 0; }
.search input {
  width: 100%; min-height: 46px; padding-inline: 13px;
  border: 1px solid #cdbb9f; border-radius: 9px; background: var(--paper); color: var(--ink);
}
.search input::placeholder { color: #6a5c4d; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-bar button {
  border: 1px solid var(--line); color: var(--muted); background: var(--paper);
  padding: 6px 14px; min-height: 40px; border-radius: 7px; font-size: .94rem;
}
.filter-bar button[aria-pressed="true"] { background: var(--dark); color: #fff7e8; border-color: var(--dark); font-weight: 700; }
.filter-bar button:hover[aria-pressed="false"] { border-color: #a88d68; }
.results-status { color: var(--muted); font-size: .88rem; min-height: 1.6rem; margin-block: 9px 7px; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.catalog-item { min-width: 0; }
.card-link {
  display: flex; flex-direction: column; height: 100%;
  text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 13px;
  overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.card-link:hover { border-color: #af8a57; box-shadow: 0 3px 14px #77563417; }
.cover { height: 175px; background: #ede3d2; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
.cover img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 2px 4px 4px 2px; box-shadow: 0 3px 9px #4b34273c; user-select: none; }
.card-about { padding: 12px 13px 9px; flex: 1; }
.card-series { color: var(--accent); font-weight: 700; font-size: .83rem; margin-bottom: 2px; }
.card-about h3 { font-size: 1.2rem; line-height: 1.21; }
.card-meta { color: var(--muted); display: flex; justify-content: space-between; gap: 6px; font-size: .87rem; margin-top: 8px; }
.card-price { color: var(--ink); font-weight: 700; }
.card-read {
  display: block; border-top: 1px solid var(--line); padding: 7px 13px;
  color: var(--accent); font-weight: 700; font-size: .89rem;
}
.card-link:hover .card-read { text-decoration: underline; text-underline-offset: 3px; }
.more { text-align: center; margin-top: 16px; }
.more:has(button[hidden]) { display: none; }

.leaflets { border-top: 1px solid var(--line); padding-block: 30px 38px; }
.pricing { background: #f0e7d5; border-block: 1px solid var(--line); }
.price-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.price-grid article { display: grid; align-content: end; gap: 10px; padding: 17px 16px; background: var(--paper); border: 1px solid #dccbad; border-radius: 11px; }
.price-grid .bundle { background: #f8edcf; border-color: #ceb279; }
.priced-covers { display: flex; min-height: 86px; align-items: center; justify-content: center; }
.priced-covers img { display: block; height: 84px; max-width: 100%; object-fit: contain; border-radius: 2px; box-shadow: 0 3px 7px #4b34273c; }
.bundle-covers { gap: 4px; }
.bundle-covers img { height: auto; width: min(47px, 18%); }
.price-grid h3 { font-size: 1.16rem; }
.price { direction: ltr; text-align: right; font-size: 2.35rem; font-weight: 700; line-height: 1.25; color: #57381f; }
.price span { font-size: 1.22rem; }
.book-offer {
  display: flex; align-items: center; gap: 19px; margin-top: 13px; padding: 14px 20px;
  border: 1px solid #dccbad; border-radius: 11px; background: var(--paper);
}
.book-offer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-block-start: 6px; }
.book-offer img { border-radius: 3px; border: 1px solid #c3a982; object-fit: contain; }
.book-offer h3 { font-size: 1.48rem; line-height: 1.2; }
.book-offer p:not(.price) { color: var(--muted); margin-block: 4px; }
.contact { display: flex; align-items: center; gap: 17px; }
.contact > img { flex: 0 0 70px; object-fit: contain; }
.contact-links { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 9px 16px; }
.contact-links a { color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
.footer {
  border-top: 1px solid var(--line); min-height: 62px; padding-block: 17px;
  display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .88rem;
}

.reader-open { overflow: hidden; }
#reader {
  width: min(960px, calc(100% - 24px));
  max-width: none;
  max-height: none;
  height: min(94dvh, 1070px);
  padding: 0;
  border: 1px solid #ddceb5;
  border-radius: 15px;
  background: var(--paper);
  color: var(--ink);
}
#reader[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
#reader::backdrop { background: #28221ce3; }
.reader-head, .reader-footer {
  padding: 9px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
}
.reader-head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.reader-heading p { color: var(--accent); font-size: .85rem; font-weight: 700; }
.reader-heading h2 { font-size: clamp(1.15rem, 2.4vw, 1.58rem); }
.reader-actions { display: flex; gap: 6px; }
.reader-actions button, .reader-footer button, .reader-footer select {
  border: 1px solid #bfab8b;
  background: var(--paper);
  color: var(--ink);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: .93rem;
  min-height: 36px;
  font-weight: 700;
}
.reader-actions button:hover, .reader-footer button:hover:not(:disabled) { background: #f0e5ce; }
#close-reader, #next { background: var(--dark); color: #fff9ed; }
#close-reader:hover, #next:hover:not(:disabled) { background: #5b4030; }
.reading-surface { overflow: auto; background: #e3d8c5; direction: ltr; }
.page-shell { width: min(690px, 100%); margin: 0 auto; padding: 10px; text-align: center; }
.page-shell.zoomed { width: max(142%, 840px); }
.page-shell img {
  display: block; width: auto; max-width: 100%; max-height: calc(94dvh - 150px); margin-inline: auto;
  background: var(--paper); box-shadow: 0 4px 12px #43362635; user-select: none;
}
.page-shell.zoomed img { max-height: none; width: 100%; }
#page-error { direction: rtl; padding: 20px; }
.reader-footer { justify-content: center; border-top: 1px solid var(--line); flex-wrap: wrap; }
.reader-footer label { display: flex; align-items: center; gap: 6px; }
#page-total { color: var(--muted); font-size: .88rem; }

@media (max-width: 1040px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-rows: minmax(320px, auto) auto; }
}
@media (max-width: 730px) {
  .wrap { width: calc(100% - 32px); }
  .nav { padding-block: 8px 10px; }
  nav { column-gap: 14px; row-gap: 2px; }
  nav a { font-size: .89rem; }
  .hero { grid-template-columns: 1fr; grid-template-rows: auto; margin-top: 17px; }
  .intro { padding: 30px 27px 20px; }
  .hero-bundle { grid-row: 2; grid-template-columns: 1fr; gap: 10px; }
  .hero-offer h2, .hero-offer-price { display: inline-block; vertical-align: middle; }
  .hero-offer-price { margin-inline-start: 8px; }
  .book-display { min-height: 245px; }
  .book { width: clamp(105px, 24vw, 155px); max-height: 90%; }
  .book-back { inset-inline-start: 18%; }
  .book-front { inset-inline-start: 40%; }
  .book-side { inset-inline-start: 60%; }
  .section { padding-block: 33px; }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { flex-wrap: wrap; }
  .contact-links { margin-inline-start: 0; }
}
@media (max-width: 540px) {
  .wrap { width: calc(100% - 24px); }
  .nav { justify-content: center; }
  .nav nav { justify-content: center; width: 100%; }
  .brand img { width: 35px; height: 43px; }
  .hero { border-radius: 15px; }
  h1 { font-size: clamp(3.15rem, 12vw, 4.65rem); }
  .intro { padding-inline: 20px; }
  .book-display { min-height: 201px; }
  .section-head { display: grid; gap: 8px; }
  .section-head .button { justify-self: start; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .cover { height: 145px; padding: 9px; }
  .card-about { padding-inline: 9px; }
  .price-grid { grid-template-columns: 1fr; gap: 7px; }
  .price-grid article { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px 14px; }
  .price-grid article:not(:has(.priced-covers)) .offer-info { grid-column: 2; }
  .priced-covers { min-height: 64px; }
  .priced-covers img { height: 62px; }
  .bundle-covers img { height: auto; }
  .price { font-size: 1.75rem; white-space: nowrap; }
  .contact-links { flex-basis: 100%; }
  #reader { width: calc(100% - 12px); height: calc(100dvh - 16px); }
  .reader-head, .reader-footer { padding-inline: 7px; }
  .reader-actions button { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .card-link { transition: none; }
}
@media print {
  body { display: none !important; }
}
