/* Use the storefront's existing compact mobile header breakpoint.
   Only top-bar actions change; desktop, menu links and handlers stay intact. */
@media (max-width: 650px) {
  .site-header .nav-actions > .ce-account-link,
  .site-header .nav-actions > .search-open {
    display: none;
  }
  .site-header .nav-actions > .favorites-link {
    display: grid;
  }
  .site-header .nav-actions {
    gap: 8px;
  }
}

/* Five familiar destinations. The original button green and white contrast
   are shared with the mobile header, without changing desktop styles. */
.ce-mobile-bottom-nav { display: none; }
@media (max-width: 650px) {
  .site-header { background: #146b52; border-bottom-color: #0d523e; }
  .site-header .brand > span,
  .site-header .brand__italic,
  .site-header .brand small { color: #fff; }
  .site-header .brand img { padding: 2px; background: #fff; border-radius: 8px; }
  .site-header .nav-actions > .icon-button { background: #fff; border-color: #fff; color: #146b52; }
  .site-header .nav-actions > .icon-button:hover { background: #edf5ee; border-color: #edf5ee; }
  .site-header .nav-actions svg { stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .site-header .cart-count { background: #fff; color: #146b52; border: 1px solid #146b52; }
  .site-header .nav-actions > .icon-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
  body[data-ce-mobile-nav] { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .ce-mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    position: fixed;
    z-index: 85;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px max(2px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(2px, env(safe-area-inset-left, 0px));
    background: #146b52;
    border-top: 1px solid #0d523e;
    box-shadow: 0 -4px 16px #143c2713;
  }
  .ce-mobile-bottom-nav > a {
    min-width: 0;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 1px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    -webkit-tap-highlight-color: transparent;
  }
  .ce-mobile-bottom-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .ce-mobile-bottom-nav > a:hover,
  .ce-mobile-bottom-nav > a[aria-current="page"],
  .ce-mobile-bottom-nav > a[aria-expanded="true"] { background: #ffffff21; }
  .ce-mobile-bottom-nav > a[aria-current="page"] { box-shadow: inset 0 -2px #fff; }
  .ce-mobile-bottom-nav > a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
  body[data-ce-mobile-nav] .toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  /* Keep modal search and an on-screen keyboard clear of fixed navigation. */
  body.no-scroll .ce-mobile-bottom-nav,
  body:has(input:not(#global-search):is(:not([type]), [type="text"], [type="email"], [type="password"], [type="search"], [type="number"], [type="tel"], [type="url"]):focus, textarea:focus, #ce-payment-form iframe:focus, [contenteditable="true"]:focus) .ce-mobile-bottom-nav { visibility: hidden; pointer-events: none; }
}

/* Compact visible mobile heart, while the separate button retains a 44px touch target. */
@media(max-width:650px){
.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn{width:44px;height:44px;top:0!important;right:0!important;background:transparent!important;border:0;box-shadow:none}
.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn::before{content:"";position:absolute;inset:0;margin:auto;width:28px;height:28px;border:1px solid #d9e5de;border-radius:7px;background:#fffffff2;box-shadow:0 2px 7px #133a3210;pointer-events:none;z-index:0}
.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn svg{position:relative;z-index:1;width:14px;height:14px;pointer-events:none}
.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn:hover::before,.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn[aria-pressed=true]::before{background:#156f52;border-color:#156f52}
}

@media(max-width:650px){
.ce-card-v46 .ce-card-actions{padding-top:0;padding-bottom:12px;border-top:0;border-bottom:1px solid #dbe6df}
}
