/* MessageCard Boutique v3.7.6
   Fix mobile Zen Cart 2.1.0 / responsive_classic Font Awesome nav icons.
   CSS-only; no modifications to product listing PHP, product data, or cart URLs.
   Loaded after v3.7.5 and scoped strictly to product detail navigation.
*/

/* On mobile Zen Cart outputs <i class="fa-solid ..."> rather than an image
   or CSS button, so v3.7.5's image fallback was not triggered. */
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a:has(> i.fa-solid) {
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:72px!important;
  min-height:42px!important;
  width:auto!important;
  max-width:100%!important;
  margin:0!important;
  padding:8px 14px!important;
  font:600 12px/1.5 'Hiragino Sans','Hiragino Kaku Gothic ProN','Yu Gothic',Meiryo,sans-serif!important;
  letter-spacing:.02em!important;
  border-radius:999px!important;
  white-space:nowrap!important;
  text-decoration:none!important;
}

/* Visually hide the icon but keep its title available to assistive tech.
   Do not use display:none on the <i> tag: it carries the title attribute. */
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a > i.fa-solid {
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  clip:rect(0, 0, 0, 0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  margin:-1px!important;
  padding:0!important;
  border:0!important;
  line-height:1!important;
}

/* nth-of-type matches the three <div> siblings, ignoring the <p> counter. */
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList:nth-of-type(1) > a:has(> i.fa-solid)::after {
  content:'← 前へ';
}
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList:nth-of-type(2) > a:has(> i.fa-solid)::after {
  content:'商品一覧に戻る';
}
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList:nth-of-type(3) > a:has(> i.fa-solid)::after {
  content:'次へ →';
}

@media (max-width:700px) {
  body.tpl_messagecard #productGeneral .navNextPrevWrapper {
    justify-content:center!important;
    gap:6px 8px!important;
    margin-bottom:13px!important;
  }
  body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevCounter {
    text-align:center!important;
    padding-bottom:3px!important;
    font-size:12px!important;
    line-height:1.4!important;
  }
  body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a:has(> i.fa-solid) {
    min-height:42px!important;
    min-width:0!important;
    padding:9px 12px!important;
    font-size:12px!important;
  }
  /* A long Japanese product title in a breadcrumb may overflow small phones. */
  body.tpl_messagecard:has(#productGeneral) #navBreadCrumb {
    max-width:calc(100% - 32px)!important;
    box-sizing:border-box!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    line-height:1.8!important;
  }
}
@media (max-width:360px) {
  body.tpl_messagecard #productGeneral .navNextPrevWrapper {gap:5px!important;}
  body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a:has(> i.fa-solid) {
    padding:8px 9px!important;
    font-size:11px!important;
  }
}
