/* Product catalogs and dedicated detail pages */
.mp-page[hidden]{display:none!important}
.mp-catalog-active #home>.hero,.mp-catalog-active #dynamicSections{display:none!important}
.mp-page{min-height:70vh;max-width:1250px;margin:auto;padding:14px 0 35px}
.mp-catalog-heading{margin-bottom:27px}.mp-catalog-heading h1{font-size:clamp(30px,3.5vw,46px);color:var(--navy);line-height:1.3;margin:14px 0 6px}
.mp-catalog-heading p{color:var(--muted);font-size:16px;margin:0}
.mp-text-back{color:var(--blue);font-weight:750;display:inline-block;margin-bottom:12px}
.mp-catalog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:23px}
.mp-catalog-card{overflow:hidden;display:flex;flex-direction:column;background:white;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);min-width:0}
.mp-catalog-cover{height:245px;display:grid;place-items:center;background:linear-gradient(140deg,#edf5ff,#f5f8fc)}
.mp-catalog-cover img,.mp-detail-cover img{height:100%;width:100%;object-fit:contain;padding:17px}
.mp-catalog-body{padding:22px;display:flex;flex-direction:column;align-items:flex-start;flex:1}
.mp-chip{background:#eaf3ff;color:#17579b;padding:3px 12px;border-radius:999px;font-size:12px;font-weight:750}
.mp-catalog-body h3{margin:12px 0 6px;color:var(--navy);font-size:21px;line-height:1.45}
.mp-summary{font-size:14px;line-height:1.85;color:var(--muted);margin:2px 0 14px;white-space:pre-line}
.mp-card-price{font-weight:800;color:var(--navy);margin:0 0 12px}
.mp-catalog-cta{margin-top:auto;width:100%}
.mp-catalog-grid .catalog-fallback,.mp-detail-cover .catalog-fallback{font-size:85px}
.mp-search{width:100%;max-width:460px;padding:13px 17px;border:1px solid #d7e3f4;border-radius:14px;margin:0 0 23px;background:#fff;color:var(--navy)}
.mp-empty{color:var(--muted);font-weight:600;padding:12px}
.mp-item-detail{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:34px;padding:35px;border:1px solid var(--line);border-radius:27px;background:#fff;box-shadow:var(--shadow);align-items:start}
.mp-detail-cover{display:grid;place-items:center;min-height:350px;aspect-ratio:4/4;background:#f0f6ff;border-radius:20px;overflow:hidden}
.mp-detail-info h1{font-size:clamp(26px,3vw,42px);color:var(--navy);line-height:1.35;margin:15px 0}
.mp-detail-summary{font-size:17px;line-height:2;color:var(--muted);white-space:pre-line}
.mp-detail-description{font-size:16px;line-height:2;white-space:pre-line;margin:17px 0 24px;color:var(--text)}
.mp-detail-price{display:block;margin:10px 0 20px;font-size:19px;color:var(--navy)}
.mp-main-cta{min-width:210px;background:var(--orange)!important;font-size:17px}
.mp-all-products{margin-top:18px}
@media(max-width:1000px){.mp-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.mp-page{padding:16px 2px 25px}.mp-item-detail{grid-template-columns:1fr;gap:16px;padding:15px;border-radius:20px}.mp-detail-cover{min-height:250px;aspect-ratio:4/3}.mp-detail-info{padding:8px}.mp-catalog-grid{gap:12px}.mp-catalog-cover{height:165px}.mp-catalog-body{padding:13px}.mp-catalog-body h3{font-size:16px}.mp-summary{font-size:12px}.mp-main-cta{width:100%}.mp-catalog-heading h1{font-size:28px}}
@media(max-width:380px){.mp-catalog-grid{grid-template-columns:1fr}.mp-catalog-cover{height:240px}}


/* Keep cover artwork separate from product information and price. */
.mp-catalog-card{position:relative;isolation:isolate;display:flex!important;flex-direction:column!important;overflow:hidden!important}
.mp-catalog-card>.mp-catalog-cover{position:relative!important;inset:auto!important;flex:0 0 245px!important;width:100%!important;height:245px!important;margin:0!important;z-index:0!important;overflow:hidden!important}
.mp-catalog-card>.mp-catalog-cover img{display:block!important;position:static!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;padding:12px!important}
.mp-catalog-card>.mp-catalog-body{position:relative!important;inset:auto!important;z-index:1!important;display:flex!important;flex:1 0 auto!important;flex-direction:column!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:18px!important;background:#fff!important;transform:none!important}
.mp-catalog-card .mp-card-price{position:static!important;display:block!important;inset:auto!important;margin:8px 0 14px!important;color:var(--navy)!important;background:transparent!important}
.mp-catalog-card .mp-catalog-cta{position:static!important;margin-top:auto!important}
@media(max-width:760px){.mp-catalog-card>.mp-catalog-cover{flex-basis:165px!important;height:165px!important}.mp-catalog-card>.mp-catalog-body{padding:13px!important}}


/* Full portrait book cover: preserve the complete artwork in catalog cards. */
.mp-catalog-card > .mp-catalog-cover {
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:3 / 4 !important;
  overflow:hidden !important;
  background:#fff !important;
}
.mp-catalog-card > .mp-catalog-cover img {
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
  padding:0 !important;
  object-fit:contain !important;
  object-position:center center !important;
}
@media(max-width:760px){
  .mp-catalog-card > .mp-catalog-cover {
    height:auto !important;
    flex-basis:auto !important;
    aspect-ratio:3 / 4 !important;
  }
}

/* FIX: show full book covers everywhere */
.mp-catalog-card .mp-catalog-cover,
#books .mp-catalog-card .mp-catalog-cover,
#courses .mp-catalog-card .mp-catalog-cover {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 4 !important;
  overflow: hidden !important;
  background: #ffffff !important;
  border-radius: 24px !important;
}

.mp-catalog-card .mp-catalog-cover img,
#books .mp-catalog-card .mp-catalog-cover img,
#courses .mp-catalog-card .mp-catalog-cover img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #ffffff !important;
  padding: 0 !important;
}

.mp-detail-cover {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 380px !important;
  height: auto !important;
  aspect-ratio: 3 / 4 !important;
  overflow: hidden !important;
  background: #ffffff !important;
  border-radius: 28px !important;
}

.mp-detail-cover img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #ffffff !important;
  padding: 0 !important;
}

@media (max-width: 760px) {
  .mp-catalog-card .mp-catalog-cover,
  #books .mp-catalog-card .mp-catalog-cover,
  #courses .mp-catalog-card .mp-catalog-cover,
  .mp-detail-cover {
    aspect-ratio: 3 / 4 !important;
    height: auto !important;
  }
}
