/* MessageCard Boutique v3.7.5 — Product detail previous/list/next navigation.
   CSS-only additive override, scoped to Zen Cart product_info (#productGeneral).
   Existing product listing pagination (v3.7.4), cart, PHP, DB remain untouched.
*/
body.tpl_messagecard #productGeneral .navNextPrevWrapper {
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:9px 10px!important;
  width:100%!important;
  max-width:none!important;
  height:auto!important;
  min-height:0!important;
  float:none!important;
  clear:both!important;
  margin:0 0 26px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  text-align:right!important;
}
/* Preserve the native product count / position above the buttons. */
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevCounter {
  order:-1!important;
  flex:0 0 100%!important;
  float:none!important;
  clear:both!important;
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0 1px 2px!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1.5!important;
  text-align:right!important;
  color:#87776f!important;
  background:transparent!important;
  border:0!important;
}
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList {
  display:block!important;
  float:none!important;
  clear:none!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
/* The <a> already owns the correct product/list URL: retain it unchanged. */
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  min-height:44px!important;
  min-width:79px!important;
  max-width:100%!important;
  width:auto!important;
  margin:0!important;
  padding:10px 19px!important;
  font:600 13px/1.5 'Hiragino Kaku Gothic ProN','Hiragino Sans','Yu Gothic',Meiryo,sans-serif!important;
  letter-spacing:.025em!important;
  white-space:nowrap!important;
  text-align:center!important;
  text-decoration:none!important;
  color:#875749!important;
  background:#fffdfb!important;
  border:1px solid #d4b6a9!important;
  border-radius:999px!important;
  box-shadow:0 2px 8px rgba(76,50,38,.04)!important;
  outline-offset:3px;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease!important;
  cursor:pointer;
}
/* The middle "商品リストに戻る" button is visually prioritized. */
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList:nth-of-type(2) > a {
  background:#96665b!important;
  border-color:#96665b!important;
  color:#fff!important;
}
/* Zen Cart CSS buttons are <span> elements that can otherwise stay blue. */
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a .cssButton,
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a .cssButtonHover,
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a .normal_button,
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a .button {
  display:inline!important;
  float:none!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  font:inherit!important;
  line-height:inherit!important;
  letter-spacing:inherit!important;
  white-space:nowrap!important;
  color:inherit!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  text-shadow:none!important;
  outline:0!important;
}
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a:hover {
  background:#f4ebe6!important;
  border-color:#aa7768!important;
  color:#774a3e!important;
  text-decoration:none!important;
}
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList:nth-of-type(2) > a:hover {
  background:#7d4e43!important;
  border-color:#7d4e43!important;
  color:#fff!important;
}
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a:focus-visible {
  outline:3px solid #b68272!important;
  outline-offset:3px!important;
}
/* Image-button mode fallback: hide only visual bitmap buttons, keep their
   alt text in the accessibility tree; render localized visual labels instead.
   :has() restricts these rules to links with no .cssButton child. */
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a:has(> img):not(:has(.cssButton)):not(:has(.cssButtonHover)) > img {
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  padding:0!important;
  margin:-1px!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  border:0!important;
}
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList:nth-of-type(1) > a:has(> img):not(:has(.cssButton)):not(:has(.cssButtonHover))::after {content:'← 前へ';}
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList:nth-of-type(2) > a:has(> img):not(:has(.cssButton)):not(:has(.cssButtonHover))::after {content:'商品リストに戻る';}
body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList:nth-of-type(3) > a:has(> img):not(:has(.cssButton)):not(:has(.cssButtonHover))::after {content:'次へ →';}
@media(max-width:700px){
  body.tpl_messagecard #productGeneral .navNextPrevWrapper{
    justify-content:center!important;
    gap:8px!important;
    margin:0 0 22px!important;
    text-align:center!important;
  }
  body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevCounter{text-align:center!important;}
  body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a{
    min-width:0!important;
    min-height:44px!important;
    padding:9px 13px!important;
    font-size:12px!important;
  }
}
@media(max-width:350px){
  body.tpl_messagecard #productGeneral .navNextPrevWrapper{gap:6px!important;}
  body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a{padding:9px 10px!important;font-size:11px!important;}
}
@media(prefers-reduced-motion:reduce){
  body.tpl_messagecard #productGeneral .navNextPrevWrapper > .navNextPrevList > a{transition:none!important;}
}
