/* =============================================================
   Publication Manager — Public Styles
   ============================================================= */

:root {
  --pm-primary:    #1565c0;
  --pm-primary-dk: #0d47a1;
  --pm-amazon:     #ff9900;
  --pm-flipkart:   #2874f0;
  --pm-border:     #e0e0e0;
  --pm-radius:     6px;
  --pm-shadow:     0 2px 12px rgba(0,0,0,.10);
  --pm-text:       #222;
  --pm-muted:      #666;
}

/* ── Outer wrap ─────────────────────────────────────────────── */
.pm-publication-wrap {
  width: 100%;
  color: var(--pm-text);
  font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 1 — Hero: image left, details right
   ═══════════════════════════════════════════════════════════════ */
.pm-pub-hero {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-bottom: 60px;
}

.pm-pub-image-col {
  flex: 0 0 320px;
  max-width: 320px;
}

.pm-pub-cover {
  width: 100%;
  display: block;
  border-radius: var(--pm-radius);
  box-shadow: var(--pm-shadow);
}

.pm-pub-details-col {
  flex: 1;
  min-width: 0;
}

/* Download Free PDF */
.pm-download-trigger-wrap {
  margin-bottom: 18px;
}

.pm-download-trigger {
  background: none;
  border: 2px solid var(--pm-primary);
  color: var(--pm-primary);
  padding: 8px 20px;
  border-radius: var(--pm-radius);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
  letter-spacing: .3px;
}
.pm-download-trigger:hover {
  background: var(--pm-primary);
  color: #fff;
}

/* Title */
.pm-pub-title {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 8px;
}

/* Author */
.pm-pub-author {
  color: var(--pm-muted);
  font-size: .92rem;
  margin: 0 0 14px;
}

/* Short description */
.pm-pub-short-desc {
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 18px;
}

/* Price */
.pm-pub-price {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--pm-primary);
  margin-bottom: 4px;
}

.pm-pub-price-note {
  font-size: .82rem;
  color: var(--pm-muted);
  margin: 0 0 16px;
}

/* Add to Cart / Buy Now */
.pm-pub-cart-wrap {
  margin-bottom: 14px;
}

.pm-pub-cart-wrap .cart {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Amazon + Flipkart buttons */
.pm-pub-buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.pm-buy-btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--pm-radius);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s, transform .15s;
  cursor: pointer;
}
.pm-buy-btn:hover {
  opacity: .88;
  transform: translateY(-1px);
  text-decoration: none;
}
.pm-buy-btn--amazon   { background: var(--pm-amazon);   color: #111; }
.pm-buy-btn--flipkart { background: var(--pm-flipkart); color: #fff; }

/* Full description */
.pm-pub-full-desc {
  border-top: 1px solid var(--pm-border);
  padding-top: 22px;
  font-size: .95rem;
  line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 2 — Related Publications Carousel
   ═══════════════════════════════════════════════════════════════ */
.pm-related-section {
  border-top: 2px solid var(--pm-border);
  padding-top: 48px;
  margin-top: 20px;
}

.pm-related-heading {
  text-align: center;
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 30px;
}

.pm-carousel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pm-carousel-viewport {
  flex: 1;
  overflow: hidden;
}

.pm-carousel-track {
  display: flex;
  transition: transform .4s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}

.pm-carousel-slide {
  flex: 0 0 25%;
  padding: 0 8px;
  box-sizing: border-box;
}

.pm-rel-card {
  display: block;
  text-decoration: none;
  color: var(--pm-text);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.pm-rel-card:hover {
  box-shadow: var(--pm-shadow);
  transform: translateY(-3px);
  text-decoration: none;
  color: var(--pm-text);
}

.pm-rel-card-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.pm-rel-card-title {
  padding: 12px 10px;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Blue arrow buttons */
.pm-carousel-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pm-primary);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.pm-carousel-btn:hover    { background: var(--pm-primary-dk); }
.pm-carousel-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Dots */
.pm-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.pm-carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pm-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}
.pm-carousel-dot.is-active {
  background: var(--pm-primary);
  transform: scale(1.3);
}

/* Shop loop badge */
.pm-download-badge {
  background: var(--pm-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 10px;
  border-radius: var(--pm-radius) var(--pm-radius) 0 0;
  display: inline-block;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   DOWNLOAD MODAL
   ═══════════════════════════════════════════════════════════════ */
.pm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pm-modal-box {
  background: #fff;
  border-radius: 10px;
  padding: 36px 40px;
  width: 100%;
  max-width: 560px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
}

.pm-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
}
.pm-modal-close:hover { color: #333; }

.pm-step-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.pm-step-sub {
  color: var(--pm-muted);
  font-size: .88rem;
  margin: 0 0 20px;
  line-height: 1.5;
}

.pm-form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.pm-form-field {
  flex: 1 1 calc(50% - 7px);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pm-form-field--full { flex: 1 1 100%; }

.pm-form-field label {
  font-size: .82rem;
  font-weight: 600;
}

.pm-form-field input[type="text"],
.pm-form-field input[type="email"],
.pm-form-field input[type="tel"] {
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  padding: 9px 12px;
  font-size: .9rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .2s;
}
.pm-form-field input:focus {
  outline: none;
  border-color: var(--pm-primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
}

.pm-req { color: #e53935; }

.pm-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  cursor: pointer;
}

.pm-form-error {
  color: #e53935;
  font-size: .82rem;
  margin: 0 0 10px;
}

.pm-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.pm-form-btn {
  padding: 10px 24px;
  border-radius: var(--pm-radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .2s;
}
.pm-form-btn:hover           { opacity: .88; }
.pm-form-btn--primary        { background: var(--pm-primary); color: #fff; }
.pm-form-btn--secondary      { background: #e0e0e0; color: #333; }

.pm-thankyou          { text-align: center; padding: 16px 0; }
.pm-thankyou h2       { font-size: 1.35rem; margin-bottom: 12px; }
.pm-thankyou p        { color: var(--pm-muted); line-height: 1.7; margin-bottom: 22px; }

/* ═══════════════════════════════════════════════════════════════
   MOBILE + COUNTRY CODE
   ═══════════════════════════════════════════════════════════════ */
.pm-mobile-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.pm-mobile-wrap:focus-within {
  border-color: var(--pm-primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
}

#pm-country-code {
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-right: 1px solid var(--pm-border);
  background: #f5f7fa;
  padding: 9px 10px 9px 10px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  color: #333;
  min-width: 90px;
  max-width: 110px;
}
#pm-country-code:focus { outline: none; }

.pm-mobile-wrap input[type="tel"] {
  flex: 1 1 auto;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 9px 12px;
  font-size: .9rem;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  background: #fff;
}
.pm-mobile-wrap input[type="tel"]:focus {
  outline: none;
  border: none;
  box-shadow: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media ( max-width: 860px ) {
  .pm-pub-hero       { flex-direction: column; gap: 24px; }
  .pm-pub-image-col  { max-width: 100%; flex: none; }
  .pm-carousel-slide { flex: 0 0 50%; }
}

@media ( max-width: 560px ) {
  .pm-modal-box      { padding: 24px 18px; }
  .pm-form-field     { flex: 1 1 100%; }
  .pm-pub-title      { font-size: 1.4rem; }
  .pm-carousel-slide { flex: 0 0 80%; }
  .pm-pub-buy-links  { flex-direction: column; }
  .pm-buy-btn        { text-align: center; }
}
