/*
 * دوره آموزشی پیشنهادی همراه کالا (صفحه محصول و سبد خرید)
 * CSS اصلی قالب از build جداگانه (Vite) می‌آید و فقط کلاس‌های طرح خودش را دارد،
 * پس کلاس‌های این بلوک اینجا هستند (پیشوند co-، مثل ac- در academy.css).
 */

/* ── ردیف‌های مشترک ───────────────────────────────── */
.co-head { display: flex; align-items: center; gap: 6px; }
.co-icon {
  width: 24px; height: 24px; flex: 0 0 24px; border-radius: 6px;
  background: #e8f1fb; color: #1a6dc0;
  display: flex; align-items: center; justify-content: center;
}
.co-icon svg { width: 16px; height: 16px; }
.co-icon--done { background: transparent; color: #00A049; }
.co-icon--done svg { width: 22px; height: 22px; }
.co-title { font-size: 13px; font-weight: 800; color: #3f4064; line-height: 1.7; min-width: 0; }
.co-title--done { color: #00A049; }
.co-link {
  margin-inline-start: auto; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 2px;
  font: inherit; font-size: 11px; font-weight: 500; color: #1c74bd;
  background: none; border: 0; padding: 4px 0; cursor: pointer;
}
.co-link:hover { color: #155a93; }
.co-link svg { width: 10px; height: 10px; }
.co-sub { font-size: 11px; color: #5b6470; line-height: 1.8; padding-inline-start: 30px; }
.co-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.co-btn {
  height: 32px; min-width: 118px; padding: 0 16px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 12px; background: transparent; cursor: pointer;
  transition: background-color .15s ease;
}
.co-btn svg { width: 14px; height: 14px; }
.co-btn:disabled { opacity: .7; cursor: wait; }
.co-btn--add { border: 1px solid #1a6dc0; color: #1a6dc0; }
.co-btn--add:hover { background: rgba(26, 109, 192, .08); }
.co-btn--remove { border: 1px solid #dc3545; color: #dc3545; }
.co-btn--remove:hover { background: rgba(220, 53, 69, .08); }

.co-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.co-old { display: flex; align-items: center; gap: 6px; }
.co-strike { font-size: 11px; color: #8a929c; text-decoration: line-through; }
.co-badge {
  background: #dc3545; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 10px; padding: 0 6px; line-height: 16px;
}
.co-final { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; color: #23254E; }
.co-final svg { width: 14px; height: 14px; color: #3f4064; }

.co-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: co-spin .8s linear infinite;
}
@keyframes co-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .co-spinner { animation-duration: 2s; } }

/* ── جایگاه «زیر ویژگی‌های مهم» ───────────────────── */
.co-card {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px;
  padding: 12px; border-radius: 10px; border: 1px solid #e3e6ea; background: #fff;
  transition: border-color .15s ease, background-color .15s ease;
}
.co-card.is-added { border-color: #bfe3cd; background: #f3faf6; }
.co-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.co-card__body .co-link { margin-inline-start: 0; align-self: flex-start; }
.co-card__body .co-sub { padding-inline-start: 30px; }
.co-card__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.co-card__side .co-btn { min-width: 0; }
@media (max-width: 575.98px) {
  .co-card { flex-wrap: wrap; align-items: flex-start; }
  .co-card__side { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
}

/* ── مودال «سرفصل‌ها» ────────────────────────────── */
@media (min-width: 768px) { .co-sheet-panel { max-width: 440px !important; } }
.co-sheet__body { display: flex; flex-direction: column; gap: 16px; }
.co-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.co-fact { background: #f6f7f9; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-fact__label { font-size: 10px; color: #5b6470; }
.co-fact__value { font-size: 12px; font-weight: 700; color: #3f4064; overflow-wrap: anywhere; }
.co-learn__title { font-size: 13px; font-weight: 800; color: #3f4064; margin-bottom: 10px; display: block; }
.co-learn { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.co-learn li { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #2b313a; line-height: 1.8; }
.co-learn svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 3px; color: #1a6dc0; }
.co-note {
  display: flex; align-items: center; gap: 8px; background: #f6f7f9; border-radius: 10px;
  padding: 10px 12px; font-size: 11px; color: #3a4250; line-height: 1.8;
}
.co-note svg { width: 16px; height: 16px; flex: 0 0 16px; color: #3a4250; }
.co-sheet__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.co-sheet__foot .co-final { font-size: 16px; font-weight: 800; }
.co-cta {
  height: 44px; padding: 0 20px; border: 0; border-radius: 8px; background: #1a6dc0; color: #fff;
  font: inherit; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.co-cta:hover { background: #155a93; }
.co-cta:disabled { opacity: .7; cursor: wait; }
.co-cta svg { width: 16px; height: 16px; }
.co-in {
  height: 44px; padding: 0 16px; border-radius: 8px; background: #f3faf6; color: #00A049;
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
}
.co-in svg { width: 16px; height: 16px; }

/* ── مودال سبک صفحه سبد (بدون Alpine) ─────────────── */
.co-modal {
  position: fixed; inset: 0; z-index: 1050; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(17, 20, 26, .55);
}
.co-modal[hidden] { display: none; }
.co-modal__panel {
  width: 100%; max-width: 440px; max-height: 90vh; background: #fff; border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column; font-family: inherit;
}
.co-modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 0 20px; border-bottom: 1px solid #eceef1;
}
.co-modal__title { font-size: 15px; font-weight: 800; color: #3f4064; }
.co-modal__close {
  width: 36px; height: 36px; border: 0; border-radius: 10px; background: #f3f4f6; color: #3f4064;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.co-modal__close svg { width: 16px; height: 16px; }
.co-modal__body { padding: 20px; overflow-y: auto; }
.co-modal__foot { border-top: 1px solid #eceef1; padding: 16px 20px; }
@media (max-width: 767.98px) {
  .co-modal { align-items: flex-end; padding: 0; }
  .co-modal__panel { max-width: none; border-radius: 16px 16px 0 0; }
}

/* ── سبد خرید: «پیشنهاد ویژه برای سبد شما» ─────────── */
.co-offers {
  background: #fff; border-radius: 16px; padding: 20px; margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 16px;
}
.co-offers__head { display: flex; align-items: center; gap: 12px; }
.co-offers__icon {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: #e8f1fb; color: #1a6dc0;
  display: flex; align-items: center; justify-content: center;
}
.co-offers__icon svg { width: 22px; height: 22px; }
.co-offers__title { font-size: 15px; font-weight: 800; color: #3f4064; display: block; }
.co-offers__sub { font-size: 11px; color: #5b6470; display: block; line-height: 1.8; }
.co-offer {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px;
  border: 1px solid #e6e8eb; background: #fff;
  transition: border-color .15s ease, background-color .15s ease;
}
.co-offer.is-added { border-color: #bfe3cd; background: #f3faf6; }
.co-offer__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.co-offer__tag {
  display: inline-flex; align-items: center; gap: 4px; background: #f3f4f6; border-radius: 6px;
  padding: 2px 8px; font-size: 10px; font-weight: 500; color: #3a4250; max-width: 100%;
}
.co-offer__tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-offer__name { font-size: 14px; font-weight: 800; color: #3f4064; line-height: 1.7; }
.co-offer__name a { color: inherit; text-decoration: none; }
.co-offer__meta { font-size: 11px; color: #5b6470; }
.co-offer__body .co-link { margin-inline-start: 0; }
.co-offer__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px; flex: 0 0 160px; }
.co-offer__side .co-strike { font-size: 13px; }
.co-offer__side .co-badge { font-size: 12px; line-height: 18px; padding: 0 7px; }
.co-offer__side .co-final { font-size: 18px; font-weight: 800; }
.co-offer__side .co-final svg { width: 16px; height: 16px; }
.co-offer__side .co-btn { width: 150px; height: 36px; font-weight: 700; }
.co-offer__state { display: flex; align-items: center; gap: 8px; }
.co-offer__in { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #00A049; }
.co-offer__in svg { width: 14px; height: 14px; }
.co-offer__state .co-btn { width: auto; min-width: 0; padding: 0 12px; }
.co-offers__foot { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #5b6470; line-height: 1.8; }
.co-offers__foot svg { width: 14px; height: 14px; flex: 0 0 14px; }
@media (max-width: 575.98px) {
  .co-offers { padding: 16px; }
  .co-offer { flex-wrap: wrap; align-items: flex-start; }
  .co-offer__side { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .co-offer__side .co-btn { width: auto; }
}
