:root {
  --navy: #131921;
  --navy-2: #232f3e;
  --orange: #febd69;
  --orange-2: #f7ca00;
  --text: #0f1111;
  --muted: #565959;
  --line: #d5d9d9;
  --bg: #ffffff;
  --link: #2162a1;
  --success: #007600;
  --danger: #b12704;
  --shadow: 0 1px 2px rgba(15,17,17,.15);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, select, input { font: inherit; }
button { cursor: pointer; }
.container-wide { width: min(1500px, calc(100% - 32px)); margin: 0 auto; }
.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;
}

.topbar {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
}
.brand-group, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.menu-btn, .lang-pill {
  background: transparent; color: #fff; border: 1px solid transparent; border-radius: 4px;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
}
.menu-btn:hover, .lang-pill:hover, .account-pill:hover, .cart-pill:hover, .delivery-pill:hover, .brand:hover {
  outline: 1px solid rgba(255,255,255,.8);
  text-decoration: none;
}
.brand { display: flex; align-items: center; }
.brand-logo {
  width: 118px; height: 36px; border-radius: 6px; display: grid; place-items: center;
  font-weight: 800; letter-spacing: .06em; font-size: 15px;
}
.placeholder-logo {
  background: linear-gradient(135deg, #ffffff 0%, #d4dbe4 100%);
  color: #101820;
}
.delivery-pill, .account-pill, .cart-pill {
  color: #fff; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px;
}
.delivery-pill small, .account-pill small { display: block; color: #cdd2d8; font-size: 11px; }
.delivery-pill strong, .account-pill strong, .cart-pill strong { font-size: 13px; font-weight: 700; }
.cart-pill { position: relative; gap: 10px; }
.cart-count {
  position: absolute; left: 15px; top: 0; color: #f08804; font-weight: 800; font-size: 15px;
}
.flag {
  width: 18px; height: 12px;
  background: linear-gradient(#000 0 33%, #dd0000 33% 66%, #ffce00 66%);
  display: inline-block; border-radius: 1px;
}

.searchbar {
  display: grid; grid-template-columns: 82px 1fr 56px; background: #fff; border-radius: 8px;
  overflow: hidden; border: 2px solid transparent;
}
.searchbar:focus-within { border-color: var(--orange); }
.searchbar select {
  border: 0; background: #e6e6e6; padding: 0 12px; color: #333;
}
.searchbar input {
  border: 0; padding: 12px 14px; min-width: 0; font-size: 16px;
}
.searchbar button {
  border: 0; background: var(--orange); color: #111;
}

.subnav {
  display: flex; gap: 18px; align-items: center; overflow-x: auto;
  padding: 8px 0 10px; background: var(--navy-2);
}
.subnav a {
  color: #fff; white-space: nowrap; font-size: 14px;
}

.books-toolbar {
  display: flex; align-items: center; gap: 24px; padding: 14px 0 10px;
  border-bottom: 1px solid #eaeded;
}
.books-title { font-size: 49px; font-weight: 300; line-height: .9; letter-spacing: -.03em; }
.books-links { display: flex; gap: 22px; flex-wrap: wrap; }
.books-links a { color: #333; font-size: 15px; }

.hero-ad { padding: 8px 0 12px; }
.placeholder-banner {
  height: 64px; border: 1px solid #ced4da; background: linear-gradient(90deg, #d9dee8, #eef2f8);
  border-radius: 3px; display: grid; place-items: center; color: #2a2f39; font-weight: 700;
}

.product-page { padding-bottom: 40px; }
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: #565959; margin: 8px 0 18px;
}
.breadcrumbs a { color: #565959; }

.product-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 315px;
  gap: 28px;
  align-items: start;
}
.gallery-col { position: sticky; top: 116px; }
.main-book-image {
  width: 100%;
  aspect-ratio: 890 / 1300;
  border: 1px solid #e3e6e6;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(15,17,17,.08);
  position: relative;
  overflow: hidden;
}

.main-book-image.placeholder-cover {
  background-color: #fff;
  background-image: url("./book_pastor1.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  padding: 0;
}
.cover-badge {
  color: #f7fbe0; font-size: 13px; font-weight: 700; letter-spacing: .09em;
}
.cover-title {
  color: #ffe250; font-weight: 800; font-size: clamp(28px, 3.2vw, 52px); line-height: .95;
  margin-top: 28px; text-transform: uppercase;
}
.cover-author {
  position: absolute; bottom: 18px; left: 18px; color: #fff; font-size: 16px; font-weight: 600;
}
.thumb-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.thumb {
  border: 1px solid #c7cfd2; background: #fff; padding: 0; border-radius: 8px; width: 44px; height: 52px;
  display: grid; place-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.thumb.active { border-color: #e77600; box-shadow: 0 0 0 2px rgba(231,118,0,.2); }
.thumb-mini {
  width: 31px; height: 40px; border-radius: 4px; background: linear-gradient(135deg, #bde7e9, #6ac1c6);
  display: grid; place-items: center; color: #fff; font-weight: 700;
}
.thumb-mini.dark { background: #5b5d61; }
.thumb-mini.video { background: #193046; }
.look-inside-btn {
  width: 100%; border: 1px solid #888c8c; background: #fff; border-radius: 999px; padding: 12px 16px;
}

.info-col h1 {
  font-size: clamp(28px, 2vw, 42px); line-height: 1.2; margin: 0 0 10px; font-weight: 500;
}
.title-row { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.share-btn {
  border: 1px solid #d5d9d9; background: #fff; width: 38px; height: 38px; border-radius: 999px; flex: none;
}
.byline { font-size: 15px; margin-bottom: 8px; }
.rating-row {
  display: flex; align-items: center; gap: 8px; font-size: 15px; padding-bottom: 14px; border-bottom: 1px solid #eaeded;
}
.stars { color: #de7921; display: flex; gap: 1px; }
.product-description {
  font-size: 17px; line-height: 1.6; color: #0f1111; margin: 18px 0; outline: none;
}
.report-link {
  display: inline-flex; gap: 8px; align-items: center; color: #2162a1; margin-bottom: 12px;
}
.meta-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid #eaeded; border-bottom: 1px solid #eaeded;
  margin: 8px 0 14px;
}
.meta-item {
  padding: 14px 10px; display: grid; justify-items: center; text-align: center; gap: 8px;
}
.meta-item + .meta-item { border-left: 1px solid #eaeded; }
.meta-item i { font-size: 24px; color: #495057; }
.meta-label { font-size: 13px; color: var(--muted); line-height: 1.35; }
.details-link { display: inline-block; margin-bottom: 20px; }
.inline-ad-card {
  border: 1px solid #e3e6e6; display: grid; grid-template-columns: 220px 1fr 88px; gap: 18px; border-radius: 4px;
  padding: 10px; align-items: center;
}
.inline-ad-image {
  min-height: 110px; background: linear-gradient(135deg, #f7f8fb, #dfe7f6); border-radius: 3px;
  display: grid; place-items: center; color: #56616b; font-weight: 700;
}
.inline-ad-copy a { font-size: 20px; }
.inline-rating { margin: 10px 0 8px; color: #de7921; }
.inline-rating span { color: #333; }
.price-line { color: #0f1111; }
.price-line span { color: #565959; text-decoration: line-through; margin-left: 6px; }
.buy-small {
  margin-top: 10px; border: 0; border-radius: 999px; background: #ffd814; padding: 10px 14px;
}
.inline-ad-side {
  min-height: 110px; border-radius: 12px; background: #f4f5f7; display: grid; place-items: center; color: #98a1aa;
}

.buy-col { position: sticky; top: 116px; }
.format-boxes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px;
}


.format-card {
  text-align: left; padding: 12px; background: #fff; border: 1px solid #d5d9d9; border-radius: 8px;
  display: grid; gap: 6px;
}
.format-card.active { border-color: #007185; box-shadow: 0 0 0 2px rgba(0,113,133,.15); }
.format-card span { font-size: 14px; color: #333; }
.format-card strong { font-size: 22px; font-weight: 700; }
.format-card small { color: #565959; }
.buy-box {
  border: 1px solid #d5d9d9; border-radius: 8px; padding: 16px; box-shadow: var(--shadow);
}
.buy-status-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 14px;
}
.radio-circle {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid #7f8c8d; display: inline-block;
}
.radio-circle.active { border-color: #007185; box-shadow: inset 0 0 0 4px #007185; }
.price-block { display: flex; align-items: flex-start; margin: 4px 0 8px; }
.price-block .currency { font-size: 42px; line-height: 1; font-weight: 500; }
.price-block sup { font-size: 18px; line-height: 1; top: 0; position: relative; }
.price-block .euro { margin-left: 4px; font-size: 20px; }
.tax-note, .delivery-note, .ship-line { color: #565959; font-size: 14px; line-height: 1.5; }
.prime-note { color: #0f6eb2; font-weight: 700; }
.stock-line { color: var(--danger); font-weight: 700; }
.qty-row { display: grid; gap: 8px; margin: 14px 0; font-size: 14px; }
.qty-row select {
  border: 1px solid #adb5bd; border-radius: 8px; padding: 10px 12px; background: #f0f2f2;
}
.cta {
  width: 100%; border: 0; border-radius: 999px; padding: 12px 16px; font-size: 15px; margin-top: 10px;
}
.cta.cart { background: #ffd814; }
.cta.buy { background: #ffa41c; }
.seller-meta {
  border-top: 1px solid #eaeded; margin-top: 16px; padding-top: 16px; display: grid; gap: 12px;
}
.seller-meta div { display: grid; gap: 4px; }
.seller-meta span { color: #565959; font-size: 13px; }
.seller-meta strong { font-size: 14px; font-weight: 500; }

[contenteditable="true"]:focus {
  outline: 2px dashed rgba(33,98,161,.35);
  outline-offset: 4px;
  border-radius: 4px;
}

@media (max-width: 1200px) {
  .product-grid { grid-template-columns: 270px minmax(0, 1fr) 290px; gap: 20px; }
  .meta-grid { grid-template-columns: repeat(3, 1fr); }
  .meta-item:nth-child(4) { border-left: none; }
  .inline-ad-card { grid-template-columns: 180px 1fr; }
  .inline-ad-side { display: none; }
}

@media (max-width: 980px) {
  .topbar-main { grid-template-columns: 1fr; }
  .brand-group, .topbar-actions { justify-content: space-between; }
  .product-grid { grid-template-columns: 1fr; }
  .gallery-col, .buy-col { position: static; }
  .gallery-col { max-width: 420px; }
  .meta-grid { grid-template-columns: repeat(2, 1fr); }
  .meta-item:nth-child(3), .meta-item:nth-child(5) { border-left: none; }
  .buy-col { max-width: 420px; }
}

@media (max-width: 720px) {
  .container-wide { width: min(100%, calc(100% - 20px)); }
  .desktop-only { display: none; }
  .books-title { font-size: 34px; }
  .books-toolbar { align-items: start; flex-direction: column; gap: 12px; }
  .searchbar { grid-template-columns: 72px 1fr 50px; }
  .meta-grid { grid-template-columns: 1fr; }
  .meta-item, .meta-item + .meta-item { border-left: none; border-top: 1px solid #eaeded; }
  .inline-ad-card { grid-template-columns: 1fr; }
  .format-boxes { grid-template-columns: 1fr; }
  .title-row { flex-direction: column; }
}
