/* ============================================================
   منیجریال — صفحه کتاب
   Brand: Deep #132a31 | Primary #0070C0 | Teal #215968 | Amber #FFB020
   ============================================================ */
:root {
  --deep: #132a31;
  --nav: #17323b;
  --primary: #0070C0;
  --teal: #215968;
  --light: #4BACC6;
  --amber: #FFB020;
  --ink: #1a2b33;
  --soft: #5b6b73;
  --line: #e9edf0;
  --bg: #f6f8f9;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(19, 42, 49, 0.08);
  --font: 'Vazirmatn', Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button, input { font-family: inherit; }

/* ---------- Top bar ---------- */
.bk-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.bk-top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bk-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--deep);
  font-size: 1.05rem;
}
.bk-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
}
.bk-brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--soft);
}
.bk-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--soft);
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--line);
  transition: .2s;
}
.bk-nav a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Hero / Product header ---------- */
.bk-hero {
  background: linear-gradient(160deg, #0f2228 0%, var(--deep) 40%, var(--teal) 100%);
  color: #fff;
  padding: 48px 20px 56px;
}
.bk-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

/* Cover */
.bk-cover-wrap {
  position: relative;
}
.bk-cover {
  width: 100%;
  border-radius: 6px 12px 12px 6px;
  box-shadow:
    8px 12px 40px rgba(0,0,0,.45),
    -2px 0 0 rgba(255,255,255,.08);
  aspect-ratio: 2/3;
  object-fit: cover;
  background: #1a2b33;
  transition: transform .35s ease;
}
.bk-cover-wrap:hover .bk-cover {
  transform: translateY(-6px) scale(1.02);
}
.bk-cover-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--amber);
  color: var(--deep);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
}

/* Info */
.bk-info h1 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 10px;
}
.bk-authors {
  font-size: 1.05rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 18px;
}
.bk-authors strong { color: var(--amber); font-weight: 600; }

.bk-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 22px;
  font-size: 0.88rem;
  color: rgba(255,255,255,.75);
}
.bk-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bk-meta i { opacity: .7; }

.bk-price-box {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.bk-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: -0.5px;
}
.bk-price small {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  margin-top: 2px;
}
.bk-qty {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(0,0,0,.25);
  border-radius: 10px;
  overflow: hidden;
}
.bk-qty button {
  width: 40px;
  height: 42px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: .15s;
}
.bk-qty button:hover { background: rgba(255,255,255,.12); }
.bk-qty input {
  width: 52px;
  height: 42px;
  border: none;
  background: transparent;
  color: #fff;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  outline: none;
}
.bk-buy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber);
  color: var(--deep);
  font-weight: 800;
  font-size: 1rem;
  padding: 12px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: .2s;
}
.bk-buy:hover {
  background: #ffc44d;
  transform: translateY(-1px);
}

.bk-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  font-size: 0.82rem;
  color: rgba(255,255,255,.7);
}
.bk-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Main content ---------- */
.bk-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  align-items: start;
}

.bk-content { display: flex; flex-direction: column; gap: 28px; }

.bk-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.bk-card-h {
  background: linear-gradient(90deg, var(--deep), var(--teal));
  color: #fff;
  padding: 14px 22px;
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bk-card-b { padding: 24px 26px; }

/* Description */
.bk-desc p {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 0.98rem;
  text-align: justify;
}
.bk-desc p:last-child { margin-bottom: 0; }

/* TOC — beautiful */
.bk-toc { counter-reset: chapter; }
.bk-toc-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
  align-items: flex-start;
  transition: .15s;
}
.bk-toc-item:last-child { border-bottom: none; }
.bk-toc-item:hover { background: #f8fafb; margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 10px; }
.bk-toc-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--primary), var(--teal));
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bk-toc-body { flex: 1; }
.bk-toc-title {
  font-weight: 700;
  color: var(--deep);
  font-size: 0.98rem;
  margin-bottom: 2px;
}
.bk-toc-sub {
  font-size: 0.85rem;
  color: var(--soft);
  line-height: 1.5;
}

/* Sample / Look Inside */
.bk-sample {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  position: relative;
  max-height: 320px;
  overflow: hidden;
}
.bk-sample::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, #f8fafb);
  pointer-events: none;
}
.bk-sample p {
  font-size: 0.95rem;
  color: var(--ink);
  text-align: justify;
  margin-bottom: 12px;
}
.bk-sample-toggle {
  display: inline-flex;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.bk-sample.expanded {
  max-height: none;
}
.bk-sample.expanded::after { display: none; }

/* Specs table */
.bk-specs {
  width: 100%;
  border-collapse: collapse;
}
.bk-specs tr { border-bottom: 1px solid var(--line); }
.bk-specs tr:last-child { border-bottom: none; }
.bk-specs th {
  text-align: right;
  padding: 11px 0;
  font-weight: 600;
  color: var(--soft);
  font-size: 0.88rem;
  width: 38%;
}
.bk-specs td {
  padding: 11px 0;
  font-weight: 500;
  color: var(--ink);
  font-size: 0.92rem;
}

/* Sidebar */
.bk-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 80px; }

.bk-side-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
}
.bk-side-card h3 {
  font-size: 1rem;
  color: var(--deep);
  margin-bottom: 14px;
  font-weight: 700;
}
.bk-order-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--ink);
}
.bk-order-form input,
.bk-order-form select,
.bk-order-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 0.92rem;
  margin-bottom: 12px;
  outline: none;
  transition: .15s;
}
.bk-order-form input:focus,
.bk-order-form select:focus,
.bk-order-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,112,192,.12);
}
.bk-order-form textarea { min-height: 70px; resize: vertical; }
.bk-order-submit {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: .2s;
  margin-top: 4px;
}
.bk-order-submit:hover { background: #005fa3; }

.bk-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bk-share a, .bk-share button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: .15s;
}
.bk-share a:hover, .bk-share button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.bk-related-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.bk-related-item:last-child { border-bottom: none; }
.bk-related-item img {
  width: 52px;
  height: 78px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.bk-related-item strong {
  display: block;
  font-size: 0.88rem;
  color: var(--deep);
  margin-bottom: 2px;
  line-height: 1.4;
}
.bk-related-item span {
  font-size: 0.8rem;
  color: var(--soft);
}

/* Footer */
.bk-foot {
  text-align: center;
  padding: 28px 20px;
  font-size: 0.85rem;
  color: var(--soft);
  border-top: 1px solid var(--line);
  background: #fff;
}
.bk-foot a { color: var(--primary); font-weight: 600; }

/* Listing page */
.bk-list-hero {
  background: linear-gradient(135deg, var(--deep), var(--teal));
  color: #fff;
  text-align: center;
  padding: 56px 20px 48px;
}
.bk-list-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.bk-list-hero p { opacity: .88; max-width: 520px; margin: 0 auto; }

.bk-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}
.bk-grid-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: .25s;
  display: flex;
  flex-direction: column;
}
.bk-grid-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(19,42,49,.12);
}
.bk-grid-cover {
  height: 280px;
  background: linear-gradient(145deg, #e8eef1, #f4f7f8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.bk-grid-cover img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 4px 8px 24px rgba(0,0,0,.18);
}
.bk-grid-body {
  padding: 18px 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.bk-grid-body h3 {
  font-size: 1.02rem;
  color: var(--deep);
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
}
.bk-grid-authors {
  font-size: 0.85rem;
  color: var(--soft);
  margin-bottom: 12px;
}
.bk-grid-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 14px;
}
.bk-grid-btn {
  display: block;
  text-align: center;
  background: var(--primary);
  color: #fff !important;
  padding: 11px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: auto;
}
.bk-grid-btn:hover { background: #005fa3; }

/* ---------- Video carousel ---------- */
.bk-videos {
  position: relative;
}
.bk-video-track-wrap {
  overflow: hidden;
  margin: 0 -6px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.bk-video-track-wrap.dragging { cursor: grabbing; }
.bk-video-track {
  display: flex;
  gap: 16px;
  padding: 4px 6px 12px;
  transition: transform 0.15s ease-out;
  will-change: transform;
}
.bk-video-card {
  flex: 0 0 280px;
  background: #0f1a1e;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transition: transform .2s, box-shadow .2s;
}
.bk-video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
}
.bk-video-player {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
}
.bk-video-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.bk-video-player .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  cursor: pointer;
  transition: background .2s;
  z-index: 2;
}
.bk-video-player .play-overlay:hover { background: rgba(0,0,0,.45); }
.bk-video-player .play-overlay.hidden { display: none; }
.bk-video-player .play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  pointer-events: none;
}
.bk-video-info {
  padding: 12px 14px 14px;
  background: #fff;
}
.bk-video-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 4px;
  line-height: 1.4;
}
.bk-video-info span {
  font-size: 0.78rem;
  color: var(--soft);
}
.bk-video-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.bk-video-nav button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--deep);
  font-size: 1.1rem;
  cursor: pointer;
  transition: .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bk-video-nav button:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f7fc;
}
.bk-video-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--soft);
  margin-top: 8px;
}

/* ---------- Custom logo print request ---------- */
.bk-custom-print {
  background: linear-gradient(135deg, #f0f7fc 0%, #e8f4f0 100%);
  border: 1.5px solid #d0e4f0;
  border-radius: 14px;
  padding: 22px 24px;
}
.bk-custom-print-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--deep);
  margin-bottom: 8px;
}
.bk-custom-print-title span {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.bk-custom-print p {
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.7;
}
.bk-custom-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--ink);
}
.bk-custom-form input,
.bk-custom-form select,
.bk-custom-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 0.92rem;
  margin-bottom: 12px;
  outline: none;
  transition: .15s;
  background: #fff;
}
.bk-custom-form input:focus,
.bk-custom-form select:focus,
.bk-custom-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,112,192,.12);
}
.bk-custom-form textarea { min-height: 70px; resize: vertical; }
.bk-custom-form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bk-custom-submit {
  width: 100%;
  padding: 13px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  transition: .2s;
  margin-top: 4px;
}
.bk-custom-submit:hover { background: #1a4a56; }
.bk-custom-note {
  font-size: 0.78rem;
  color: var(--soft);
  margin-top: 10px;
  text-align: center;
}

/* Responsive */
@media (max-width: 960px) {
  .bk-hero-inner { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .bk-cover-wrap { max-width: 220px; margin: 0 auto; }
  .bk-meta, .bk-trust { justify-content: center; }
  .bk-price-box { justify-content: center; }
  .bk-main { grid-template-columns: 1fr; }
  .bk-side { position: static; }
  .bk-video-card { flex: 0 0 240px; }
  .bk-custom-form .row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .bk-info h1 { font-size: 1.4rem; }
  .bk-price { font-size: 1.5rem; }
  .bk-grid { grid-template-columns: 1fr; }
  .bk-video-card { flex: 0 0 220px; }
}
