/* ============================================================
   📚 کتابخانهٔ هومت — آرشیو کتاب‌ها و فلش‌کارت‌ها (قالب 2.1.0)
   هم‌خوان با پالت سایت: زرشکی #9E1F42، کرم #FAF7F1، فیروزه‌ای #125E67
   ============================================================ */

/* چیپ‌های فیلتر زبان */
.hm-lib-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.hm-lib-chip {
  padding: 7px 16px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid #E4D6D2; color: #382028; background: #FFFEFB;
  font-size: 14px; transition: all .15s ease;
}
.hm-lib-chip:hover { border-color: #9E1F42; color: #9E1F42; }
.hm-lib-chip.is-on { background: #9E1F42; border-color: #9E1F42; color: #fff; }

/* شبکهٔ کارت‌ها */
.hm-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 20px; }
.hm-lib-grid .hm-lib-collection { grid-column: 1 / -1; background: #FBF3F0; border: 1.5px solid #E4D6D2; border-radius: 18px; padding: 16px 18px 6px; }
.hm-lib-collection__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; color: #9E1F42; margin-bottom: 12px; }
.hm-lib-collection__head strong { font-size: 17px; }
.hm-lib-collection__head small { color: #7A6470; }
.hm-lib-collection .hm-lib-grid, .hm-lib-collection .hm-lib-card { background: transparent; border: 0; padding: 0; }
.hm-lib-collection { display: block; }
.hm-lib-collection .hm-lib-card { margin-bottom: 12px; background: #FFFEFB; border: 1.5px solid #E4D6D2; border-radius: 14px; padding: 12px; display: flex; }

/* کارت آیتم */
.hm-lib-card {
  display: flex; flex-direction: column; text-decoration: none; color: #382028;
  background: #FFFEFB; border: 1.5px solid #E4D6D2; border-radius: 16px; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.hm-lib-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(158, 31, 66, .12); }
.hm-lib-card__cover { display: block; background: #F7E9EE; aspect-ratio: 4 / 3; overflow: hidden; }
.hm-lib-card__cover .hm-lib-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-lib-card__ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 52px; }
.hm-lib-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.hm-lib-card__title { font-size: 15.5px; line-height: 1.7; }
.hm-lib-card__sub { color: #7A6470; font-size: 12.5px; }
.hm-lib-card__ex { color: #5c4a52; font-size: 13px; line-height: 1.9; }
.hm-lib-card__cta { margin-top: auto; color: #9E1F42; font-weight: 700; font-size: 13px; }

/* صفحهٔ تک */
.hm-lib-back a { text-decoration: none; color: #7A6470; font-size: 13.5px; }
.hm-lib-back a:hover { color: #9E1F42; }
.hm-lib-single { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 26px; margin-top: 14px; }
@media (max-width: 700px) { .hm-lib-single { grid-template-columns: 1fr; } }
.hm-lib-single__cover { background: #F7E9EE; border-radius: 20px; overflow: hidden; align-self: start; }
.hm-lib-single__img { width: 100%; height: auto; display: block; }
.hm-lib-single .hm-lib-card__ph { aspect-ratio: 3 / 4; font-size: 90px; }
.hm-lib-single__body h1 { font-size: 26px; color: #9E1F42; margin: 0 0 10px; line-height: 1.7; }
.hm-lib-single__coll, .hm-lib-single__lang { color: #7A6470; font-size: 14px; margin: 0 0 6px; }
.hm-lib-single__price { display: flex; flex-wrap: wrap; gap: 6px 18px; background: #FBF3F0; border: 1.5px dashed #D9B8A5; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
.hm-lib-single__content { line-height: 2.1; font-size: 15px; margin-top: 12px; }
.hm-lib-single__content h2 { color: #9E1F42; font-size: 20px; margin: 22px 0 10px; }

/* جعبهٔ دریافت در اپ */
.hm-lib-appbox {
  margin-top: 22px; background: #9E1F42; color: #fff; border-radius: 16px; padding: 18px 20px;
}
.hm-lib-appbox strong { font-size: 16.5px; }
.hm-lib-appbox p { margin: 8px 0 0; opacity: .94; line-height: 2; font-size: 14px; }

/* کتابخانهٔ من (پروفایل) */
.hm-lib-mine { background: #FFFEFB; border: 1.5px solid #E4D6D2; border-radius: 16px; padding: 18px 20px; margin-top: 26px; }
.hm-lib-mine h3 { color: #9E1F42; margin: 0 0 6px; font-size: 18px; }
.hm-lib-mine__hint { color: #7A6470; font-size: 13px; margin: 0 0 10px; }
.hm-lib-mine ul { list-style: none; margin: 0; padding: 0; }
.hm-lib-mine li { padding: 9px 0; border-top: 1px solid #F1E4E1; font-size: 14.5px; }
.hm-lib-mine li small { color: #7A6470; margin-inline-start: 8px; }
.hm-lib-badge { display: inline-block; background: #F7E9EE; color: #9E1F42; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; margin-inline-end: 6px; }

/* نمونه‌کارت‌های چرخان (بدون جاوااسکریپت) */
.hm-flip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 14px 0 6px; }
.hm-flip { background: #FFFEFB; border: 1.5px solid #E4D6D2; border-radius: 16px; overflow: hidden; }
.hm-flip summary { cursor: pointer; list-style: none; padding: 18px 16px; font-size: 17px; font-weight: 700; color: #382028; text-align: center; }
.hm-flip summary::-webkit-details-marker { display: none; }
.hm-flip summary small { display: block; margin-top: 8px; color: #7A6470; font-size: 11px; font-weight: 400; }
.hm-flip[open] summary { display: none; }
.hm-flip__face--back { padding: 20px 16px; text-align: center; background: #F2D492; color: #4A1D24; border-radius: 0; font-size: 16px; line-height: 2; }
.hm-flip__face--back::after { content: "↺"; display: block; margin-top: 8px; opacity: .55; cursor: pointer; }

/* CTA اطلس */
.hm-atlas-cta { margin-top: 8px; }
.hm-atlas-cta h2 { text-align: center; color: #9E1F42; font-size: 22px; margin-bottom: 16px; }
.hm-atlas-cta__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.hm-atlas-cta__card {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none; text-align: center;
  background: #FFFEFB; border: 1.5px solid #E4D6D2; border-radius: 18px; padding: 20px 16px; color: #382028;
  transition: transform .15s ease, box-shadow .15s ease;
}
.hm-atlas-cta__card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(158, 31, 66, .12); }
.hm-atlas-cta__ico { font-size: 34px; }
.hm-atlas-cta__card strong { color: #9E1F42; font-size: 16.5px; }
.hm-atlas-cta__card small { color: #7A6470; font-size: 12.5px; }
