/* shop.php — สื่อการสอนทั้งหมด (หน้าสาธารณะ) */
.sh-search { position: relative; display: flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; margin-bottom: 12px; }
.sh-search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.sh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 11px 10px; font: inherit; font-size: 14px; color: #1f2b45; }
.sh-search input::-webkit-search-cancel-button { display: none; }
.sh-clear { color: var(--muted); font-size: 13px; padding: 4px 6px; }

.sh .mt-cats { margin-bottom: 12px; }

.sh-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 12px; }
.sh-count { font-size: 12.5px; color: var(--muted); }
.sh-sort { display: flex; gap: 4px; background: #eef1f6; border-radius: 10px; padding: 3px; }
.sh-sort a { padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sh-sort a.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(11, 30, 63, .08); }

.sh-grid { gap: 18px 14px; margin-bottom: 18px; }
.sh-item { position: relative; display: block; color: inherit; }
.sh-item .mt-cover { border-radius: 12px; }
.sh-off { position: absolute; top: 8px; right: 8px; background: #e0463a; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 999px; }
.sh-meta { display: flex; gap: 8px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sh-meta span:first-child:not(:only-child) { color: #c9a227; font-weight: 700; }

.sh-login { text-align: center; }
.sh-login p { margin: 0 0 10px; font-size: 13.5px; }
.sh-btn-line { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }

/* material_item.php — รายละเอียดสื่อ (สาธารณะ) */
.mi-teacher { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 12px 0; color: inherit; }
.mi-teacher img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.mi-teacher b { display: block; font-size: 14px; color: var(--navy); }
.mi-teacher small { font-size: 12px; color: var(--muted); }
.mi-teacher svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; margin-left: auto; flex: none; }
.mi-buy { display: grid; place-items: center; height: 50px; border-radius: 10px; background: var(--navy); color: #fff; font-size: 15px; font-weight: 700; margin-top: 14px; }
.mi-buy:active { transform: scale(.98); }
.mi-note { margin: 8px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.mi-note a { color: var(--blue); font-weight: 700; }
.mi-gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.mi-gal img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.mi-files { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.mi-file { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; color: #4a5872; }
.mi-file svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.mi-file span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-file em { font-style: normal; font-size: 11px; color: var(--muted); }
.mi-rec .mt-item { display: block; color: inherit; }

/* index.php — การ์ดสื่อในหน้าแรก */
.tl-mi { display: block; color: inherit; text-decoration: none; }
.tl-mi .mt-cover { border-radius: 10px; border-color: #ccc; }
.tl-mi .mt-cover .mt-g { font-size: 30px; }
.tl-mi .mt-cover .mt-vbadge { font-size: 10px; padding: 3px 7px; }
.tl-mi .text2 b { color: var(--navy); }
