/* ===========================================================
   Caesar Books — stylesheet
   =========================================================== */

:root {
  --bg:        #f5f2ec;
  --surface:   #ffffff;
  --ink:       #1d1a16;
  --muted:     #6b645b;
  --line:      #e4ddd2;
  --accent:    #b8341b;
  --accent-dk: #8f2613;
  --gold:      #e8a317;
  --shadow:    0 6px 24px rgba(29, 26, 22, .10);
  --radius:    14px;
  --maxw:      1180px;
  --font:      "Georgia", "Times New Roman", serif;
  --sans:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .5px;
}
.brand:hover { text-decoration: none; }
.brand .crown {
  display: inline-flex;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 9px;
  font-size: 1.2rem;
}
.brand span small { color: var(--gold); font-size: .7rem; display: block; letter-spacing: 2px; font-family: var(--sans); }

.main-nav { display: flex; gap: 26px; }
.main-nav a {
  color: #ded7cc;
  font-size: .95rem;
  font-weight: 500;
}
.main-nav a:hover { color: #fff; text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #2a1f17 0%, #4a2c1a 60%, #b8341b 130%);
  color: #fff;
  padding: 70px 0 80px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 16px;
  line-height: 1.15;
}
.hero p {
  max-width: 620px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
  color: #ecdfd2;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 13px 28px;
  border-radius: 40px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background .2s, transform .1s;
}
.btn:hover { background: var(--accent-dk); text-decoration: none; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid #fff;
}
.btn-outline:hover { background: #fff; color: var(--ink); }

/* ---------- Section ---------- */
.section { padding: 64px 0; }
.section-title {
  font-family: var(--font);
  font-size: 2rem;
  margin: 0 0 6px;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 44px;
  max-width: 560px;
}

/* ---------- Book grid / cards ---------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 28px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-media {
  background: #efe9df;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.card-media img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
}
.card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  background: #fbe9e5;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  font-weight: 700;
}
.card-title {
  font-family: var(--font);
  font-size: 1.12rem;
  line-height: 1.3;
  margin: 0 0 6px;
  color: var(--ink);
}
.card-author { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
}
.price { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.stars { color: var(--gold); font-size: .85rem; }
.stars small { color: var(--muted); margin-left: 4px; }

.btn-sm { padding: 9px 16px; font-size: .9rem; border-radius: 30px; }

/* ---------- Product page ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: 48px;
  padding: 50px 0 30px;
}
.gallery .main-img {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}
.gallery .main-img img { max-height: 460px; width: auto; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.thumbs {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.thumbs img {
  width: 70px; height: 90px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: border-color .15s;
}
.thumbs img:hover, .thumbs img.active { border-color: var(--accent); }

.product-info h1 {
  font-family: var(--font);
  font-size: 1.9rem;
  margin: 0 0 8px;
  line-height: 1.2;
}
.product-info .by { color: var(--muted); margin: 0 0 14px; }
.product-info .by strong { color: var(--ink); }
.product-price {
  font-size: 2rem;
  font-weight: 700;
  margin: 18px 0 4px;
}
.in-stock { color: #2e7d32; font-weight: 600; font-size: .95rem; margin-bottom: 22px; }
.buy-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.affiliate-note {
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 24px;
}
.note-box {
  background: #fbf6ec;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: .92rem;
  color: #4a443b;
  margin: 24px 0;
}

.lead { font-size: 1.05rem; color: #3a352e; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 6px;
  font-size: .95rem;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table th { width: 38%; color: var(--muted); font-weight: 600; }

.block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 26px;
}
.block h2 {
  font-family: var(--font);
  font-size: 1.4rem;
  margin: 0 0 16px;
}
.block h3 { font-size: 1.05rem; margin: 22px 0 8px; }

.review {
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 18px;
  margin: 0 0 20px;
  color: #43403a;
}
.review cite { display: block; margin-top: 6px; color: var(--muted); font-style: normal; font-size: .9rem; }

.breadcrumb { font-size: .88rem; color: var(--muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.back-link { display: inline-block; margin: 30px 0; font-weight: 600; }

/* ---------- Static / policy pages ---------- */
.doc { max-width: 820px; margin: 0 auto; padding: 50px 0; }
.doc h1 { font-family: var(--font); font-size: 2.2rem; }
.doc h2 { font-family: var(--font); margin-top: 36px; }
.doc p, .doc li { color: #3a352e; }

/* ---------- Contact form ---------- */
.contact-form { margin-top: 26px; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 52, 27, .12);
}
.form-row textarea { resize: vertical; min-height: 130px; }
.form-msg { margin-top: 14px; font-size: .92rem; color: #2e7d32; display: none; }
.form-msg.show { display: block; }
.contact-meta { color: var(--muted); }
.contact-meta a { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c9c1b5;
  padding: 50px 0 26px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 34px;
}
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 1rem; }
.site-footer a { color: #c9c1b5; display: block; margin-bottom: 8px; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-brand { font-family: var(--font); font-size: 1.4rem; color: #fff; margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid #3a342c;
  padding-top: 20px;
  font-size: .85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  max-width: 560px;
  margin: 0 auto;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  padding: 22px 24px;
  z-index: 100;
  transform: translateY(140%);
  transition: transform .35s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner h3 { margin: 0 0 8px; font-family: var(--font); font-size: 1.15rem; }
.cookie-banner p { margin: 0 0 16px; font-size: .9rem; color: var(--muted); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 10px 20px; font-size: .9rem; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: #f1ece4; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .main-nav { gap: 16px; }
}
@media (max-width: 560px) {
  .main-nav { display: none; }
  .hero { padding: 50px 0 56px; }
  .section { padding: 44px 0; }
}
