/* ==========================================================
   ADN GLOBAL – Marketplace home (/marketplace) from mokup-utama.png
   prefix: mh-
   ========================================================== */
:root {
    --mh-green: #0b8a4e;
    --mh-green-2: #12a24a;
    --mh-ink: #0b1324;
    --mh-text: #1f2937;
    --mh-muted: #6b7280;
    --mh-line: #e6e9ef;
    --mh-bg: #f5f8fd;
    --mh-red: #e51111;
    --mh-orange: #fd8c13;
    --mh-star: #fbb203;
    --mh-shadow: 0 6px 22px rgba(30, 41, 59, .07), 0 1px 3px rgba(30, 41, 59, .05);
    --mh-head: 'Poppins', 'Inter', sans-serif;
}
body.index-page { background: var(--mh-bg); }

.mh-main { max-width: 1568px; margin: 0 auto; width: 100%; padding: 18px 18px 40px 25px; }
.mh-layout { display: grid; grid-template-columns: 275px minmax(0, 1fr); gap: 18px; align-items: start; }
.mh-content { min-width: 0; }

/* ---------------- Sidebar ---------------- */
.mh-side { position: sticky; top: 16px; }
.mh-side-card { background: #fff; border-radius: 18px; box-shadow: var(--mh-shadow); padding: 6px 9px 25px 10px; margin-top: 6px; }
.mh-side-toggle {
    width: 100%; height: 52px; display: flex; align-items: center; gap: 11px; padding: 0 12px;
    background: #f4f7fb; border: 0; border-radius: 14px; cursor: pointer;
    font-size: 18px; font-weight: 700; color: var(--mh-ink); letter-spacing: -.01em; font-family: inherit;
}
.mh-side-toggle svg { width: 21px; height: 21px; color: #1f2937; }
.mh-side-toggle:hover { background: #edf2f8; }
.mh-side-body { padding: 0 8px 0 10px; }
.mh-fsec { padding: 19px 0 17px; border-top: 1.5px solid #eceff4; }
.mh-side-body > .mh-fsec:first-child { margin-top: 12px; }
.mh-fsec:last-child .mh-fhead { margin-bottom: 0; }
.mh-fsec:last-child { padding-bottom: 0; }
.mh-fhead { display: flex; align-items: center; gap: 9px; margin: 0 0 7px; font-size: 18.5px; line-height: 24px; font-weight: 700; color: var(--mh-ink); letter-spacing: -.015em; }
.mh-fhead svg { width: 22px; height: 22px; color: #13a33c; flex-shrink: 0; }
.mh-flist { display: flex; flex-direction: column; }
.mh-fopt { display: flex; align-items: center; gap: 14px; min-height: 32.5px; cursor: pointer; padding-left: 2px; }
.mh-fopt input {
    appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; flex-shrink: 0;
    border: 1.6px solid #8f949c; border-radius: 4px; background: #fff; cursor: pointer; display: grid; place-content: center;
    transition: background-color .15s, border-color .15s;
}
.mh-fopt input::after { content: ''; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.4px 2.4px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.mh-fopt input:checked { background: #13a33c; border-color: #13a33c; }
.mh-fopt input:checked::after { opacity: 1; }
.mh-fopt input:focus-visible { outline: 2px solid #86efac; outline-offset: 2px; }
.mh-fname { flex: 1; font-size: 17px; color: var(--mh-text); letter-spacing: -.01em; }
.mh-fopt:hover .mh-fname { color: var(--mh-green); }
.mh-fcount { font-size: 14.5px; color: #6b7280; }
.mh-fstars { display: inline-flex; gap: 3px; }
.mh-star { width: 19px; height: 19px; fill: none; stroke: #b9bec7; stroke-width: 1.6; stroke-linejoin: round; }
.mh-star.on { fill: var(--mh-star); stroke: var(--mh-star); }
.mh-fstars .mh-star { width: 20px; height: 20px; }
.mh-search { position: relative; margin-top: 16px; }
.mh-search input {
    width: 100%; height: 40px; border: 1.5px solid #cdd3dc; border-radius: 10px; padding: 0 40px 0 14px;
    font-size: 14px; color: var(--mh-text); background: #fff; outline: none; font-family: inherit;
}
.mh-search input::placeholder { color: #4b5563; }
.mh-search input:focus { border-color: #13a33c; box-shadow: 0 0 0 3px rgba(19, 163, 60, .15); }
.mh-search svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: #1f2937; pointer-events: none; }

/* ---------------- Hero ---------------- */
.mh-hero {
    position: relative; overflow: hidden; border-radius: 22px; min-height: 291px;
    background:
        radial-gradient(120% 140% at 0% 100%, #04907a 0%, rgba(4, 144, 122, 0) 55%),
        linear-gradient(100deg, #015a4c 0%, #046a55 30%, #0a7d5f 55%, #0d8a5f 70%);
    box-shadow: 0 10px 28px rgba(1, 95, 79, .18);
    isolation: isolate;
}
.mh-hero-photo {
    position: absolute; top: 0; right: 0; bottom: 0; width: 61.6%;
    background: url('/assets/mk/hero-photo.jpg') right center / cover no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%);
            mask-image: linear-gradient(90deg, transparent 0, #000 7%);
    z-index: -1;
}
.mh-hero-wave { position: absolute; left: 0; bottom: 0; width: 58%; height: 44%; z-index: -2; pointer-events: none; }
.mh-hero-text { position: relative; padding: 22px 20px 19px 49px; max-width: 470px; }
.mh-hero h1 {
    margin: 0; font-family: var(--mh-head); font-weight: 700; color: #fff;
    font-size: 39.5px; line-height: 1.07; letter-spacing: -.012em; white-space: nowrap;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.mh-hero h1 span { color: #fbe52a; }
.mh-hero p { margin: 10px 0 0; font-size: 18px; line-height: 1.42; color: #fff; letter-spacing: -.01em; white-space: nowrap; }
.mh-hero-btn {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; height: 46px; padding: 0 22px 0 26px;
    border-radius: 999px; background: linear-gradient(180deg, #fff046 0%, #fbd81c 100%);
    color: #063d2f; font-weight: 700; font-size: 17px; letter-spacing: -.02em; text-decoration: none; font-family: var(--mh-head);
    box-shadow: 0 6px 16px rgba(240, 200, 10, .38), inset 0 -2px 0 rgba(0, 0, 0, .06);
    transition: transform .15s ease, box-shadow .2s ease;
}
.mh-hero-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.mh-hero-btn svg:last-child { width: 21px; height: 21px; margin-left: 4px; }
.mh-hero-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(240, 200, 10, .45); }
.mh-hero-pills { position: absolute; right: 32px; top: 35px; display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.mh-hero-pills li {
    width: 240px; height: 62px; display: flex; align-items: center; gap: 14px; padding: 0 12px;
    border-radius: 13px; background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(244,250,244,.93));
    box-shadow: 0 6px 18px rgba(0, 60, 20, .16);
}
.mh-hero-pills li:nth-child(3) { padding-left: 16px; }
.mh-pill-ic { width: 46px; height: 46px; border-radius: 999px; background: radial-gradient(circle at 35% 30%, #22b52a, #078d12); color: #fff; display: grid; place-items: center; flex-shrink: 0; box-shadow: inset 0 -2px 4px rgba(0,0,0,.12); }
.mh-pill-ic svg { width: 25px; height: 25px; }
.mh-hero-pills li > span:last-child { display: flex; flex-direction: column; font-size: 15.5px; line-height: 1.25; color: #1f2937; letter-spacing: -.015em; }
.mh-hero-pills b { font-weight: 700; color: #0b1324; }

/* ---------------- Category tabs ---------------- */
.mh-tabs { display: grid; grid-template-columns: 1.05fr 1fr 1fr 1.07fr 1.13fr; gap: 11px; margin: 22px 13px 0 12px; }
.mh-tab {
    height: 67px; border: 0; border-radius: 14px; background: #fff; cursor: pointer; padding: 6px;
    box-shadow: 0 4px 16px rgba(30, 41, 59, .06), 0 1px 2px rgba(30, 41, 59, .04);
    transition: transform .15s ease, box-shadow .2s ease; font-family: inherit;
}
.mh-tab:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(30, 41, 59, .09); }
.mh-tab-in {
    height: 100%; display: flex; align-items: center; justify-content: center; gap: 20px; border-radius: 10px;
    font-size: 18px; font-weight: 600; line-height: 1.1; color: var(--mh-ink); text-align: left; letter-spacing: -.01em;
}
.mh-tab-in svg { width: 36px; height: 36px; color: #13a33c; flex-shrink: 0; }
.mh-tab.is-active .mh-tab-in { background: linear-gradient(180deg, #1aa45a 0%, #0c8a47 100%); color: #fff; box-shadow: 0 4px 12px rgba(12, 138, 71, .3); }
.mh-tab.is-active .mh-tab-in svg { color: #fff; width: 32px; height: 32px; }

/* ---------------- Results header ---------------- */
.mh-reshead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 26px 2px 19px 11px; scroll-margin-top: 20px; }
.mh-reshead h2 { margin: 0; font-size: 30px; font-weight: 800; color: var(--mh-ink); line-height: 1.15; letter-spacing: -.02em; }
.mh-reshead p { margin: 4px 0 0; font-size: 16px; color: #4b5563; letter-spacing: -.01em; }
.mh-tools { display: flex; align-items: center; gap: 0; padding-bottom: 6px; }
.mh-sort { position: relative; display: flex; align-items: center; height: 40px; width: 210px; border: 1.5px solid #dfe3ea; border-radius: 8px; background: #fff; margin-right: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.03); }
.mh-sort > svg:first-child { position: absolute; left: 13px; width: 19px; height: 19px; color: #1f2937; pointer-events: none; }
.mh-sort select { appearance: none; -webkit-appearance: none; width: 100%; height: 100%; border: 0; background: transparent; padding: 0 34px 0 40px; font-size: 15.5px; color: #111827; cursor: pointer; outline: none; font-family: inherit; }
.mh-sort-chev { position: absolute; right: 12px; width: 16px; height: 16px; color: #1f2937; pointer-events: none; }
.mh-viewsw { display: flex; gap: 6px; }
.mh-viewsw button { width: 47px; height: 40px; border-radius: 8px; border: 0; background: #fff; color: #1f2937; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(30,41,59,.06); }
.mh-viewsw button svg { width: 22px; height: 22px; }
.mh-viewsw button.is-active { background: linear-gradient(180deg, #0f8d4f, #077a42); color: #fff; box-shadow: 0 4px 10px rgba(7, 122, 66, .3); }
.mh-mfilter { display: none; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 8px; border: 0; background: #0b8a4e; color: #fff; font-weight: 600; font-size: 14px; margin-right: 8px; cursor: pointer; }
.mh-mfilter svg { width: 18px; height: 18px; }

.mh-active { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 2px 16px 11px; }
.mh-active.hidden { display: none; }
.mh-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px 5px 12px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 13px; font-weight: 600; }
.mh-chip button { display: grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 99px; background: transparent; color: inherit; cursor: pointer; }
.mh-chip button:hover { background: rgba(22, 101, 52, .12); }
.mh-chip svg { width: 12px; height: 12px; }
.mh-clear { border: 0; background: none; color: #dc2626; font-size: 13px; font-weight: 600; cursor: pointer; padding: 5px 6px; }

/* ---------------- Product cards ---------------- */
#course-grid.mh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 17px; align-items: stretch; margin: 0 6px 0 6px; }
#course-grid > .mh-card {
    display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: 14px; overflow: hidden; cursor: pointer;
    box-shadow: 0 6px 20px rgba(30, 41, 59, .08), 0 1px 3px rgba(30, 41, 59, .05);
    transition: transform .2s ease, box-shadow .2s ease;
}
#course-grid > .mh-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(30, 41, 59, .13); }
.mh-card-media { position: relative; height: 190px; background: #e5e7eb; overflow: hidden; flex-shrink: 0; }
.mh-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.mh-card:hover .mh-card-media img { transform: scale(1.04); }
.mh-badge {
    position: absolute; top: 9px; right: 9px; padding: 4px 11px; border-radius: 999px;
    background: linear-gradient(180deg, #1fae4f, #0d9a3e); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: -.01em;
    border: 1.5px solid rgba(255, 255, 255, .7); box-shadow: 0 3px 8px rgba(0, 0, 0, .18);
}
.mh-card-ph { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.95); font-family: var(--mh-head); font-weight: 700; font-size: 22px; letter-spacing: -.01em; position: relative; }
.mh-card-ph span { position: relative; padding: 8px 18px; border: 2px solid rgba(255,255,255,.55); border-radius: 12px; }
.mh-ph-vid { background: radial-gradient(circle at 25% 20%, #34d399 0, transparent 45%), linear-gradient(135deg, #065f46, #0b8a4e 55%, #84cc16); }
.mh-ph-sw { background: radial-gradient(circle at 75% 25%, #60a5fa 0, transparent 45%), linear-gradient(135deg, #0f172a, #1e3a8a 55%, #0ea5e9); }
.mh-detail-img img { display: block; width: 100%; height: auto; }
.mh-detail-img .mh-card-ph { aspect-ratio: 3 / 2; }

.mh-card-body { display: flex; flex-direction: column; flex: 1; padding: 11px 16px 17px 17px; }
.mh-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mh-card-title { margin: 0; font-size: 19.5px; font-weight: 700; color: var(--mh-ink); line-height: 1.3; letter-spacing: -.015em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mh-heart { width: 28px; height: 28px; border: 0; background: none; padding: 2px; color: #1f2937; cursor: pointer; flex-shrink: 0; margin-top: 0; border-radius: 99px; transition: transform .15s ease, color .15s; }
.mh-heart svg { width: 100%; height: 100%; }
.mh-heart:hover { transform: scale(1.1); color: #e11d48; }
.mh-heart.is-on { color: #e11d48; }
.mh-heart.is-on svg { fill: #e11d48; }
.mh-card-by { display: flex; align-items: center; gap: 6px; margin: 3px 0 0; font-size: 14px; color: #4b5563; min-width: 0; }
.mh-card-by svg { width: 15px; height: 15px; flex-shrink: 0; color: #4b5563; }
.mh-card-by span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-card-rate { display: flex; align-items: center; gap: 2px; margin-top: 5px; }
.mh-card-rate .mh-star { width: 16px; height: 16px; }
.mh-card-rate span { margin-left: 6px; font-size: 13.5px; color: #4b5563; }
.mh-card-price { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 7px; }
.mh-price-wrap { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 7px; min-width: 0; }
.mh-price { font-size: 22.5px; font-weight: 800; color: var(--mh-red); letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.mh-price-free { color: var(--mh-orange); }
.mh-price-old { font-size: 13px; color: #9ca3af; }
.mh-off { font-size: 11.5px; font-weight: 700; color: #fff; background: #ef4444; padding: 1px 6px; border-radius: 6px; align-self: center; }
.mh-sold { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: #c76a00; white-space: nowrap; flex-shrink: 0; }
.mh-sold svg { width: 17px; height: 17px; color: #e58a00; }
.mh-card-actions { display: flex; gap: 12px; margin-top: 9px; }
.mh-cartbtn {
    width: 54px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 7px; cursor: pointer;
    background: #fff; border: 1.5px solid #d4d8df; color: #0b5d3b; box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: border-color .15s, background-color .15s;
}
.mh-cartbtn svg { width: 19px; height: 19px; }
.mh-cartbtn:hover { border-color: #0b8a4e; background: #f0fdf4; }
.mh-btn {
    flex: 1; min-width: 0; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px;
    border: 0; border-radius: 7px; color: #fff; font-weight: 600; font-size: 15px; letter-spacing: -.015em; cursor: pointer; white-space: nowrap; font-family: inherit;
    transition: filter .15s ease, transform .15s ease;
}
.mh-btn span { overflow: hidden; text-overflow: ellipsis; }
.mh-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.mh-btn:hover:not([disabled]) { filter: brightness(1.07); }
.mh-btn:active:not([disabled]) { transform: scale(.98); }
.mh-btn-owned { background: linear-gradient(180deg, #0c9454, #037f45); box-shadow: 0 4px 10px rgba(3, 127, 69, .25); }
.mh-btn-buy { background: linear-gradient(180deg, #129f1d, #028c0c); box-shadow: 0 4px 10px rgba(2, 140, 12, .25); }
.mh-btn-blue { background: linear-gradient(180deg, #1c7dff, #0566ef); box-shadow: 0 4px 10px rgba(5, 102, 239, .28); }
.mh-btn-free { background: linear-gradient(180deg, #ff9a2a, #f57c00); box-shadow: 0 4px 10px rgba(245, 124, 0, .28); }
.mh-btn-pending { background: #fef3c7; color: #92400e; box-shadow: inset 0 0 0 1.5px #fcd34d; font-size: 13.5px; }
.mh-btn-mine { background: #e5e7eb; color: #4b5563; cursor: not-allowed; }

/* list view */
#course-grid.mh-grid.is-list { grid-template-columns: 1fr; }
#course-grid.is-list > .mh-card { flex-direction: row; height: auto; }
#course-grid.is-list .mh-card-media { width: 300px; height: auto; min-height: 190px; }
#course-grid.is-list .mh-card-body { padding: 18px 22px; }
#course-grid.is-list .mh-card-actions { max-width: 380px; }

.mh-more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.mh-more-wrap.hidden { display: none; }
.mh-more { height: 44px; padding: 0 28px; border-radius: 999px; border: 1.5px solid #0b8a4e; background: #fff; color: #0b8a4e; font-weight: 700; font-size: 15px; cursor: pointer; }
.mh-more:hover { background: #0b8a4e; color: #fff; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1440px) {
    .mh-hero h1 { font-size: 35px; }
    .mh-hero p { font-size: 16.5px; }
    .mh-hero-text { padding-left: 38px; }
    .mh-hero-pills { right: 22px; }
    .mh-hero-pills li { width: 222px; }
    .mh-tab-in { gap: 12px; font-size: 16px; }
    .mh-tab-in svg { width: 30px; height: 30px; }
}
@media (max-width: 1280px) {
    .mh-main { padding: 16px 16px 40px; }
    .mh-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 16px; }
    .mh-hero-photo { width: 66%; }
    .mh-hero-pills { display: none; }
    .mh-fname { font-size: 15.5px; }
}
@media (max-width: 1024px) {
    .mh-layout { display: block; }
    .mh-side { position: fixed; top: auto; }
    .mh-side-card { box-shadow: none; margin: 0; padding-top: 0; }
    .mh-mfilter { display: inline-flex; }
    .mh-tabs { margin: 16px 0 0; display: flex; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 10px; gap: 10px; }
    .mh-tabs::-webkit-scrollbar { display: none; }
    .mh-tab { flex: 0 0 auto; min-width: 160px; height: 60px; }
    .mh-tab-in { padding: 0 14px; }
    .mh-reshead { margin: 14px 0 14px; }
    .mh-active { margin-left: 0; }
    #course-grid.mh-grid { margin: 0; }
}
@media (max-width: 767px) {
    .mh-main { padding: 12px 12px 30px; }
    .mh-hero { min-height: 0; display: flex; flex-direction: column; border-radius: 18px; }
    .mh-hero-photo { position: relative; order: 2; width: 100%; aspect-ratio: 758 / 290; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%); mask-image: linear-gradient(180deg, transparent 0, #000 16%); margin-top: -18px; z-index: 0; background-position: 30% center; }
    .mh-hero-wave { display: none; }
    .mh-hero-text { padding: 22px 20px 6px; max-width: none; z-index: 1; }
    .mh-hero h1 { font-size: 26px; white-space: normal; }
    .mh-hero p { font-size: 14.5px; white-space: normal; }
    .mh-br { display: none; }
    .mh-hero-btn { height: 42px; font-size: 15px; padding: 0 18px; margin-top: 16px; }
    .mh-reshead { flex-direction: column; align-items: stretch; }
    .mh-reshead h2 { font-size: 23px; }
    .mh-reshead p { font-size: 14px; }
    .mh-tools { padding: 0; }
    .mh-sort { flex: 1; width: auto; margin-right: 8px; }
    .mh-viewsw { display: none; }
    .mh-tab { min-width: 138px; height: 54px; }
    .mh-tab-in { font-size: 14.5px; gap: 10px; }
    .mh-tab-in svg { width: 26px; height: 26px; }
    #course-grid.is-list > .mh-card { flex-direction: column; }
    #course-grid.is-list .mh-card-media { width: 100%; }
}
/* phone 2-column cards (mobile-app-styles forces 2 cols ≤1024) */
@media (max-width: 640px) {
    #course-grid.mh-grid { gap: 10px !important; padding: 0 !important; }
    .mh-card-media { height: 118px; }
    .mh-badge { font-size: 10px; padding: 2px 7px; top: 6px; right: 6px; }
    .mh-card-body { padding: 9px 10px 11px; }
    .mh-card-title { font-size: 14.5px !important; }
    .mh-heart { width: 22px; height: 22px; }
    .mh-card-by { font-size: 11.5px !important; margin-top: 3px; }
    .mh-card-by svg { width: 12px; height: 12px; }
    .mh-card-rate .mh-star { width: 12px; height: 12px; }
    .mh-card-rate span { font-size: 11px; margin-left: 3px; }
    .mh-card-price { flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 8px; }
    .mh-price { font-size: 16px; }
    .mh-sold { font-size: 11px !important; }
    .mh-sold svg { width: 13px; height: 13px; }
    .mh-card-actions { gap: 6px; margin-top: 8px; }
    .mh-cartbtn { width: 36px; height: 34px; }
    .mh-cartbtn svg { width: 16px; height: 16px; }
    .mh-btn { height: 34px; font-size: 12.5px; gap: 4px; padding: 0 6px; }
    .mh-btn svg { width: 14px; height: 14px; }
}

/* ---- fixes: mid widths & phones ---- */
@media (max-width: 1280px) and (min-width: 768px) {
    .mh-hero-photo { width: 56%; background-position: 16% center; }
    .mh-hero-wave { width: 50%; }
}
@media (max-width: 1100px) and (min-width: 768px) {
    .mh-hero h1 { font-size: 30px; }
    .mh-hero p { font-size: 15px; }
    .mh-hero-photo { width: 50%; }
}
@media (max-width: 1024px) {
    #course-grid.mh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .mh-card, .mh-card-body, .mh-card-top, .mh-card-title { min-width: 0; }
}
@media (min-width: 700px) and (max-width: 1024px) {
    #course-grid.mh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
.mh-heart svg { width: 100% !important; height: 100% !important; }
.mh-card-title { min-height: 0 !important; }
.mh-sort select#mh-sort { padding: 0 34px 0 40px !important; height: 100% !important; min-height: 0 !important; line-height: normal !important; border: 0 !important; box-shadow: none !important; background: transparent !important; font-size: 15px !important; border-radius: 8px !important; }
@media (max-width: 1024px) {
    #course-grid .mh-heart { min-height: 0; min-width: 0; width: 24px; height: 24px; }
    #course-grid .mh-cartbtn, #course-grid .mh-btn { min-height: 0; min-width: 0; }
}

/* ---------------- Product ratings (detail view) ---------------- */
.mh-detail-rating { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; color: #4b5563; text-decoration: none; }
.mh-detail-rating b { margin-left: 6px; color: #111827; }
.mh-detail-rating span { margin-left: 4px; }
.mh-detail-rating:hover span { color: #0b8a4e; text-decoration: underline; }
.mh-rv { margin-top: 24px; border-top: 1px solid #e5e7eb; padding-top: 24px; scroll-margin-top: 90px; }
.mh-rv-title { margin: 0 0 16px; font-size: 22px; font-weight: 800; color: #0b1324; }
.mh-rv-muted { color: #6b7280; font-size: 14px; }
.mh-rv-top { display: flex; gap: 28px; align-items: center; padding: 18px 20px; border-radius: 14px; background: #f8fafc; border: 1px solid #eef1f5; }
.mh-rv-score { text-align: center; min-width: 120px; }
.mh-rv-score strong { display: block; font-size: 44px; line-height: 1; font-weight: 800; color: #0b1324; }
.mh-rv-score div { display: flex; justify-content: center; gap: 2px; margin: 8px 0 4px; }
.mh-rv-score span { font-size: 13px; color: #6b7280; }
.mh-rv-bars { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mh-rv-bar { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #4b5563; }
.mh-rv-bar .mh-star { width: 14px; height: 14px; }
.mh-rv-bar i { flex: 1; height: 8px; border-radius: 99px; background: #e5e7eb; overflow: hidden; }
.mh-rv-bar i b { display: block; height: 100%; background: var(--mh-star); border-radius: 99px; }
.mh-rv-bar em { font-style: normal; width: 28px; text-align: right; }
.mh-rv-note { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #f0fdf4; color: #166534; font-size: 14px; }
.mh-rv-note a { font-weight: 700; text-decoration: underline; }
.mh-rv-form { margin-top: 16px; padding: 16px; border: 1.5px solid #d1fae5; border-radius: 14px; background: #fff; }
.mh-rv-form-t { margin: 0 0 8px; font-weight: 700; color: #0b1324; }
.mh-rv-pick { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.mh-rv-pick button { width: 34px; height: 34px; padding: 2px; border: 0; background: none; cursor: pointer; min-height: 0; min-width: 0; }
.mh-rv-pick button svg { width: 100%; height: 100%; fill: none; stroke: #b9bec7; stroke-width: 1.6; stroke-linejoin: round; transition: transform .12s, fill .12s; }
.mh-rv-pick button.on svg { fill: var(--mh-star); stroke: var(--mh-star); }
.mh-rv-pick button:hover svg { transform: scale(1.12); }
.mh-rv-pick span { margin-left: 8px; font-size: 14px; color: #4b5563; font-weight: 600; }
.mh-rv-form textarea { width: 100%; border: 1.5px solid #d1d5db; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical; outline: none; }
.mh-rv-form textarea:focus { border-color: #13a33c; box-shadow: 0 0 0 3px rgba(19, 163, 60, .15); }
.mh-rv-err { margin: 8px 0 0; font-size: 13px; color: #b91c1c; }
.mh-rv-err.hidden { display: none; }
.mh-rv-form-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.mh-rv-form-act button { height: 40px; padding: 0 18px; border-radius: 9px; border: 0; background: linear-gradient(180deg, #129f1d, #028c0c); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.mh-rv-form-act button.ghost { background: #f3f4f6; color: #374151; }
.mh-rv-form-act button[disabled] { opacity: .6; cursor: wait; }
.mh-rv-mine { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; font-size: 14px; color: #14532d; }
.mh-rv-mine > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mh-rv-mine > div:first-child .mh-star { margin-right: -6px; }
.mh-rv-mine p { margin: 8px 0 0; color: #1f2937; white-space: pre-line; }
.mh-rv-hidden { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #e5e7eb; color: #374151; margin-left: 6px; }
.mh-rv-mine-act { display: flex; gap: 8px; margin-top: 10px; }
.mh-rv-mine-act button { border: 0; background: #fff; border: 1px solid #bbf7d0; color: #166534; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer; min-height: 0; }
.mh-rv-mine-act button.danger { color: #b91c1c; border-color: #fecaca; }
.mh-rv-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; }
.mh-rv-item { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid #f1f3f6; }
.mh-rv-av { width: 38px; height: 38px; border-radius: 99px; background: linear-gradient(180deg, #0db02f, #029a1b); color: #fff; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.mh-rv-body { min-width: 0; }
.mh-rv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: #111827; }
.mh-rv-you { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #dcfce7; color: #166534; }
.mh-rv-date { font-size: 12.5px; color: #9ca3af; }
.mh-rv-stars { display: flex; gap: 1px; margin-top: 3px; }
.mh-rv-body p { margin: 6px 0 0; font-size: 14px; color: #374151; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.mh-rv-empty { padding: 14px 0; color: #6b7280; font-size: 14px; border-top: 1px solid #f1f3f6; }
@media (max-width: 640px) {
    .mh-rv-top { flex-direction: column; align-items: stretch; gap: 14px; }
}
