/* ═══════════════════════════════════════════════════════════════
   books.css  —  Book gallery carousel + contact form
   Used by: books.php
═══════════════════════════════════════════════════════════════ */

/* ── Mobile-safe base ── */
.panel,
.panel-body { overflow-wrap: anywhere; }

.nav-brand  { min-width: 0; }
.nav-title,
.nav-subtitle {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ── Book gallery ── */
.evg-wrap {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 40px;
}

.evg-row {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  width: 100%;
  touch-action: pan-y;
  scrollbar-width: none;
}
.evg-row::-webkit-scrollbar { display: none; }

.evg-card {
  flex: 0 0 100%;
  max-width: 100%;
  box-sizing: border-box;
  scroll-snap-align: center;
  text-align: center;
  padding: 20px 18px;
}

.evg-card img {
  width: min(110px, 40vw);
  height: auto;
  aspect-ratio: 110 / 170;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: block;
  margin: 0 auto 12px;
}

.evg-title {
  font-size: 1.05em;
  font-weight: 700;
  margin: 6px 0 2px;
}

.evg-author {
  font-size: 0.88em;
  opacity: 0.65;
  margin: 2px 0;
}

.evg-price {
  font-size: 0.9em;
  font-weight: 600;
  margin: 4px 0 10px;
}

.evg-desc {
  font-size: 0.88em;
  line-height: 1.7;
  opacity: 0.8;
  max-width: 480px;
  margin: 0 auto 14px;
  text-align: left;
}

.evg-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.evg-buttons a {
  display: inline-block;
  padding: 7px 18px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: inherit;
  opacity: 0.8;
  transition: opacity 0.15s, background 0.15s;
}
.evg-buttons a:hover {
  opacity: 1;
  background: rgba(128, 128, 128, 0.1);
}

.evg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(11, 17, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity 0.15s;
  color: inherit;
  z-index: 2;
}
.evg-arrow:hover { opacity: 1; }
.evg-left  { left: 6px; }
.evg-right { right: 6px; }

.evg-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 4px;
}

.evg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.3;
  cursor: pointer;
  transition: opacity 0.15s;
}
.evg-dot.active { opacity: 0.85; }

/* ── Contact form ── */
.cf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.cf-label {
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.6;
}

.cf-input,
.cf-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  font-size: 0.95em;
  font-family: inherit;
  background: transparent;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: vertical;
}

.cf-input:focus,
.cf-textarea:focus {
  outline: none;
  border-color: currentColor;
  box-shadow: 0 0 0 2px rgba(128, 128, 128, 0.15);
}

.cf-submit {
  background: none;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 8px 22px;
  font-size: 0.9em;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: inherit;
  opacity: 0.85;
  transition: opacity 0.15s, background 0.15s;
  width: 100%;
  max-width: 220px;
}
.cf-submit:hover {
  opacity: 1;
  background: rgba(128, 128, 128, 0.1);
}

/* ── Responsive overrides ── */
@media (max-width: 960px) {
  .evg-wrap { padding: 0; }
  .evg-arrow {
    top: auto;
    bottom: 12px;
    transform: none;
  }
  .evg-left  { left: 10px; }
  .evg-right { right: 10px; }
}

@media (max-width: 720px) {
  .nav-inner    { align-items: flex-start; }
  .nav-brand    { width: calc(100% - 44px); gap: 0.5rem; }
  .nav-logo     { width: 46px; height: 46px; flex: 0 0 46px; }
  .nav-title    { font-size: 0.92rem; }
  .nav-subtitle { font-size: 0.65rem; letter-spacing: 0.08em; }
  .evg-card     { padding: 14px 10px 44px; }
  .evg-desc     { font-size: 0.86em; line-height: 1.55; }
  .evg-buttons a { padding: 8px 12px; font-size: 0.82em; }
  .evg-arrow    { width: 32px; height: 32px; font-size: 14px; }
  .footer { gap: 8px; }
}

@media (max-width: 460px) {
  .evg-arrow  { display: none; }
  .evg-card   { padding-bottom: 12px; }
  .cf-submit  { max-width: none; }
}
