/* Merch shop (Phase 7b/7c): Toko, item page, cart, checkout, Pesananku. Loaded only on these pages;
   uses the colours and components of site.css. */
.merch .m-batas { margin: 0; font-weight: 600; }
.m-cart { gap: 8px; align-self: flex-start; }
.m-cart .ic { width: 22px; height: 22px; }
.m-n { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--blue); color: #fff; display: inline-grid; place-items: center; font-size: 14px; }
.m-chips { margin: 4px 0; }
.m-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.m-card { display: block; padding: 5px; border-radius: 20px; text-decoration: none; color: inherit; }
.m-card[hidden] { display: none; }
.m-in { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 16px; padding: 8px 8px 12px; height: 100%; }
.m-in img, .m-ph { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; border-radius: 12px; background: var(--ph); display: block; }
.m-in b { font-size: 15px; line-height: 1.25; }
.m-price { font-weight: 700; color: var(--blue); }
.m-price.big { font-size: 22px; margin: 0; }
.m-tag { align-self: flex-start; padding: 2px 8px; border-radius: 8px; background: var(--chip); color: var(--navlbl); font-size: 13px; font-weight: 600; }
.m-donasi progress { width: 100%; height: 14px; accent-color: var(--blue); }
.m-donasi-n { margin: 0; }
.m-donasi-f { display: flex; flex-direction: column; gap: 10px; }
.field input[type=number], .field input[type=email], .field input[type=tel], .field input:not([type]) { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fff; font-size: 16px; font-weight: 400; }
/* item photos: swipe, with dots below instead of a scroll bar */
.m-foto { width: 100%; max-width: 480px; margin: 0 auto; }
.m-item .m-gal { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; scrollbar-width: none; }
.m-gal::-webkit-scrollbar { display: none; }
.m-dots { display: flex; justify-content: center; margin-top: 4px; }
.m-dots .dot { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.m-dots .dot::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--line); }
.m-dots .dot.on { width: 30px; background: none; }
.m-dots .dot.on::before { width: 20px; background: var(--blue); }
.m-gal-a { flex: 0 0 100%; scroll-snap-align: start; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.m-chart .zoom { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; } .m-chart .zoom img { width: 100%; height: auto; display: block; }
.m-gal img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 16px; background: var(--ph); display: block; }
.m-ph.big { border-radius: 16px; }
.m-head { display: flex; flex-direction: column; gap: 4px; }
.m-head h2 { margin: 0; }
.m-desc { white-space: pre-line; margin: 0; }
.m-chart summary { font-weight: 600; min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--blue); }
.m-chart img { width: 100%; height: auto; border-radius: 12px; }
.m-vars { display: flex; flex-wrap: wrap; }
.m-vars .segb { flex: 0 1 auto; min-width: 64px; }
.m-vars .segb span { padding: 0 14px; }
.m-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.m-line { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--gray); }
.m-line img, .m-line .m-ph { width: 56px; height: 56px; border-radius: 10px; grid-row: span 2; }
.m-line .m-t { font-weight: 600; }
.m-line .m-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.m-line select { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; background: #fff; }
.m-line .btn { min-height: 44px; padding: 0 12px; }
.m-opts { display: flex; flex-direction: column; }
.m-opt span { flex-direction: column; justify-content: center; gap: 0; padding: 6px 12px; text-align: left; align-items: flex-start; }
.m-opt small { font-weight: 500; font-size: 14px; }
.m-ship { display: flex; flex-direction: column; gap: 12px; }
.m-ship[hidden] { display: none; }
.m-sum { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--gray); padding-top: 10px; }
.m-sum p { display: flex; justify-content: space-between; margin: 0; gap: 10px; }
.m-sum .m-tot { font-size: 18px; font-weight: 700; }
.m-dialog { border: 0; border-radius: 20px; padding: 20px; width: min(92vw, 420px); }
.m-dialog::backdrop { background: rgba(10, 20, 35, .6); }
.m-dialog h2 { margin-top: 0; }
.m-orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.m-orders .row-link { display: flex; color: inherit; border-bottom: 1px solid var(--gray); }
.m-orders small { display: block; }
.m-st { padding: 3px 10px; border-radius: 10px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--chip); color: var(--navlbl); }
.m-st.st-menunggu_bayar { background: #FFFAEB; color: #93370D; }
.m-st.st-lunas, .m-st.st-dikirim, .m-st.st-diambil { background: #ECFDF3; color: #067647; }
.m-st.st-batal { background: var(--gray); color: var(--muted); }
.m-table { width: 100%; border-collapse: collapse; }
.m-table td, .m-table th { padding: 8px 0; border-bottom: 1px solid var(--gray); text-align: left; vertical-align: top; }
.m-table td:last-child, .m-table th:last-child { text-align: right; white-space: nowrap; padding-left: 10px; }
.m-table small { display: block; }
.m-table tfoot th { font-size: 18px; border-bottom: 0; }
.m-inv h2 { margin: 0; }
@media (min-width: 640px) {
  .m-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .m-opts { flex-direction: row; }
  .m-opts .segb { flex: 1; }
}
@media (min-width: 900px) {
  .m-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
/* the closed "Merch segera hadir" card: quick taps must not zoom the page on phones */
[data-m] { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
/* item page: a size already in the cart: "− n +" */
.m-step { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.m-step[hidden], [data-qty][hidden], [data-addbtn][hidden], .m-incart[hidden] { display: none; }
.m-step .btn { min-width: 48px; min-height: 48px; padding: 0; font-size: 24px; line-height: 1; }
.m-step b { min-width: 28px; text-align: center; font-size: 20px; }
.m-step-l { font-weight: 600; }
.m-incart { margin: 0; color: var(--navlbl); font-weight: 600; }
/* cart lines as in the Toko wireframe: name, size · qty × price, "Hapus" as a text link */
.m-line .m-t { display: flex; flex-direction: column; gap: 2px; }
.m-line .m-t a { font-weight: 600; color: inherit; }
.m-del { background: none; border: 0; padding: 0 4px; min-height: 44px; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
