/* =================================================================
   עמותת סבא ישראל — bookstore styles
   BRIGHT theme: warm cream / white bg, black-on-white text,
   gold/amber + soft-green accents. Hebrew RTL.
   ================================================================= */

:root {
  --cream:       #FBF8F1;
  --cream-2:     #F4EFE3;
  --white:       #FFFFFF;
  --ink:         #2A2620;       /* near-black, warm */
  --ink-soft:    #5C564C;
  --line:        #E7DFCD;
  --gold:        #C79A33;
  --gold-deep:   #9A7415;
  --amber:       #E0A23B;
  --green:       #6B9A4E;
  --green-deep:  #4E7836;
  --rose:        #B6607C;
  --radius:      14px;
  --radius-sm:   10px;
  --shadow:      0 6px 24px rgba(120, 96, 40, 0.10);
  --shadow-sm:   0 2px 10px rgba(120, 96, 40, 0.08);
  --maxw:        1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Heebo", "Assistant", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Frank Ruhl Libre", "Heebo", serif;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 .5em;
  color: var(--ink);
}

a { color: var(--gold-deep); text-decoration: none; }
a:hover { color: var(--gold); }

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: 2rem; }
.section-head p { color: var(--ink-soft); max-width: 620px; margin: 0 auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: inherit; font-size: 1rem; font-weight: 600;
  padding: 11px 22px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--gold); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--gold-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--cream-2); color: var(--ink); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-deep); color: #fff; }
.btn-sm { padding: 7px 16px; font-size: .92rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 248, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 20px; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: #fff;
  display: grid; place-items: center;
  font-family: "Frank Ruhl Libre", serif; font-weight: 700; font-size: 1.45rem;
  box-shadow: var(--shadow-sm); flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: "Frank Ruhl Libre", serif; font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.brand-sub { font-size: .72rem; color: var(--ink-soft); letter-spacing: .02em; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--ink); padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .98rem;
}
.site-nav a:hover { background: var(--cream-2); }
.site-nav a.active { color: var(--gold-deep); }
.site-nav .nav-donate { background: var(--green); color: #fff; }
.site-nav .nav-donate:hover { background: var(--green-deep); }

.cart-link { position: relative; display: inline-flex; align-items: center; }
.cart-badge {
  position: absolute; top: -6px; left: -10px;
  background: var(--rose); color: #fff; font-size: .72rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; display: none; align-items: center; justify-content: center;
}
.nav-toggle {
  display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--ink);
  padding: 4px 8px;
}

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 85% -10%, #FCEFC9 0%, rgba(252,239,201,0) 60%),
    linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 2.8rem; margin-bottom: .3em; }
.hero .lede { font-size: 1.18rem; color: var(--ink-soft); margin-bottom: 1.2em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.quote-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; box-shadow: var(--shadow);
  position: relative;
}
.quote-card::before {
  content: "”"; font-family: "Frank Ruhl Libre", serif; font-size: 4rem; color: var(--gold);
  position: absolute; top: 4px; inset-inline-start: 18px; opacity: .35; line-height: 1;
}
.quote-card blockquote {
  margin: 0; font-family: "Frank Ruhl Libre", serif; font-size: 1.5rem; line-height: 1.5; color: var(--ink);
}
.quote-card cite { display: block; margin-top: 14px; font-style: normal; color: var(--gold-deep); font-weight: 600; }

/* ---------- info banner / placeholder note ---------- */
.note-banner {
  background: #FFF7E0; border: 1px dashed var(--amber); color: #6f5410;
  border-radius: var(--radius-sm); padding: 12px 18px; font-size: .95rem;
  display: flex; gap: 10px; align-items: center; justify-content: center; text-align: center;
}

/* ---------- book grid ---------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 26px;
}
.book-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .12s ease, box-shadow .15s ease;
}
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.book-cover { display: block; background: var(--cream-2); aspect-ratio: 220/300; }
.book-cover .cover-ph svg, .book-cover .cover-img { width: 100%; height: 100%; object-fit: cover; }
.book-meta { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.book-title { font-size: 1.22rem; margin: 0 0 2px; }
.book-title a { color: var(--ink); }
.book-title a:hover { color: var(--gold-deep); }
.book-author { font-size: .85rem; color: var(--ink-soft); margin: 0 0 8px; }
.book-blurb { font-size: .92rem; color: var(--ink-soft); margin: 0 0 14px; flex: 1; }
.book-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.book-price { font-weight: 700; font-size: 1.15rem; color: var(--gold-deep); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 30px; }
.filter-btn {
  background: var(--white); border: 1px solid var(--line); color: var(--ink);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: .92rem;
  transition: all .12s ease;
}
.filter-btn:hover { border-color: var(--gold); }
.filter-btn.active { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(42, 38, 32, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--white); border-radius: var(--radius); max-width: 720px; width: 100%;
  box-shadow: var(--shadow); position: relative; max-height: 90vh; overflow: auto;
}
.modal-close {
  position: absolute; top: 10px; inset-inline-end: 14px; background: none; border: none;
  font-size: 2rem; line-height: 1; cursor: pointer; color: var(--ink-soft);
}
.modal-body { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 28px; }
.modal-cover { background: var(--cream-2); border-radius: var(--radius-sm); overflow: hidden; }
.modal-cover .cover-ph svg, .modal-cover .cover-img { width: 100%; height: 100%; }
.modal-info h2 { font-size: 1.8rem; }
.modal-author { color: var(--ink-soft); margin-top: -4px; }
.modal-desc { color: var(--ink-soft); }
.modal-price { font-size: 1.4rem; font-weight: 700; color: var(--gold-deep); margin: 16px 0; }
.ph-note { font-size: .8rem; color: var(--ink-soft); font-weight: 400; }

/* ---------- cart / table ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 14px; }
.cart-row {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 14px; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px;
}
.cart-row .cover-ph svg, .cart-row .cover-img { width: 64px; height: 87px; border-radius: 6px; }
.cart-row-title { font-weight: 600; }
.cart-row-author { font-size: .82rem; color: var(--ink-soft); }
.qty-box { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-box button { background: var(--cream-2); border: none; width: 32px; height: 32px; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.qty-box button:hover { background: var(--line); }
.qty-box input { width: 42px; height: 32px; border: none; text-align: center; font-family: inherit; font-size: 1rem; background: #fff; }
.line-total { font-weight: 700; color: var(--gold-deep); min-width: 70px; text-align: left; }
.row-remove { background: none; border: none; color: var(--rose); cursor: pointer; font-size: .85rem; }

.cart-summary {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: sticky; top: 90px; box-shadow: var(--shadow-sm);
}
.cart-summary h3 { font-size: 1.3rem; }
.sum-line { display: flex; justify-content: space-between; padding: 8px 0; color: var(--ink-soft); }
.sum-total { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line);
  font-size: 1.3rem; font-weight: 700; color: var(--ink); margin-top: 6px; }
.empty-cart { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 1rem; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199,154,51,.18);
}
.card-box {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}

/* ---------- features / donate strip ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 22px; }
.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  text-align: center;
}
.feature .ico { font-size: 2rem; margin-bottom: 6px; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

.donate-cta {
  background: linear-gradient(135deg, #F3F8EC 0%, #FBF8F1 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px; text-align: center;
}
.donate-cta h2 { font-size: 2rem; }
.donate-cta p { color: var(--ink-soft); max-width: 640px; margin: 0 auto 18px; }
.tax-note { font-size: .85rem; color: var(--ink-soft); margin-top: 14px; }

/* ---------- about / contact ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose p { color: var(--ink-soft); }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.info-list li strong { min-width: 120px; }
.ph-tag { background: #FFF7E0; color: #6f5410; font-size: .72rem; padding: 2px 8px; border-radius: 6px; border: 1px dashed var(--amber); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--cream-2); border-top: 1px solid var(--line);
  padding: 40px 0 28px; margin-top: 40px;
}
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer-inner h4 { font-size: 1.05rem; }
.footer-inner a { display: block; color: var(--ink-soft); padding: 3px 0; }
.footer-inner a:hover { color: var(--gold-deep); }
.footer-bottom { text-align: center; color: var(--ink-soft); font-size: .85rem; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: .95rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: all .2s ease; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-cover { max-width: 200px; margin: 0 auto; }
  .footer-inner { grid-template-columns: 1fr; gap: 18px; }
  .form-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 70px; inset-inline-end: 12px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 10px; box-shadow: var(--shadow); min-width: 180px;
  }
  .site-nav.open { display: flex; }
}

@media (max-width: 480px) {
  .cart-row { grid-template-columns: 50px 1fr; row-gap: 8px; }
  .cart-row .line-total { grid-column: 2; text-align: right; }
  .hero h1 { font-size: 1.9rem; }
}
