/*
 * Belle's Treasures R40.2 — Mobile refinement
 * Customer pages only. Owner workspace is excluded.
 */

/* Touch devices never display hover-style navigation bubbles. */
@media (max-width:700px), (hover:none), (pointer:coarse) {
  body:not(.owner-admin-body) #bt-nav-gold-tooltip,
  body:not(.owner-admin-body) #bt-storefront-tooltip,
  body:not(.owner-admin-body) #bt-r33-tooltip,
  body:not(.owner-admin-body) #bt-r34-tooltip {
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  body:not(.owner-admin-body)
  header.site-header [data-bt-tip]::before,
  body:not(.owner-admin-body)
  header.site-header [data-bt-tip]::after,
  body:not(.owner-admin-body)
  header.site-header [data-bt-r34-tip]::before,
  body:not(.owner-admin-body)
  header.site-header [data-bt-r34-tip]::after {
    content:none!important;
    display:none!important;
  }
}

html.bt-r402-touch
body:not(.owner-admin-body) [role="tooltip"] {
  display:none!important;
}

/* Everything below applies only to mobile-sized screens. */
@media (max-width:700px) {

  /* Restore Zoom. Put it on its own row below navigation. */
  body:not(.owner-admin-body)
  > header.site-header.deco-shell {
    display:flex!important;
    flex-wrap:wrap!important;
    min-width:0!important;
    overflow:visible!important;
  }

  body:not(.owner-admin-body)
  > header.site-header.deco-shell
  > .bt-r402-zoom-row {
    display:flex!important;
    width:100%!important;
    flex:0 0 100%!important;
    justify-content:flex-end!important;
    align-items:center!important;
    min-width:0!important;
    padding:5px 4px!important;
    margin:0!important;
  }

  body:not(.owner-admin-body)
  #bt-r33-zoom.bt-r33-zoom {
    display:inline-flex!important;
    visibility:visible!important;
    opacity:1!important;
    position:relative!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    max-width:100%!important;
    height:36px!important;
    min-height:36px!important;
    padding:3px 8px!important;
    margin:0!important;
    gap:5px!important;
    border:1px solid #bd9849!important;
    border-radius:999px!important;
    background:#111113!important;
    color:#f5cd68!important;
  }

  body:not(.owner-admin-body)
  #bt-r33-zoom .bt-r33-zoom-label {
    display:inline!important;
    font-size:.73rem!important;
    font-weight:800!important;
  }

  body:not(.owner-admin-body)
  #bt-r33-zoom button {
    display:grid!important;
    place-items:center!important;
    width:29px!important;
    min-width:29px!important;
    height:29px!important;
    min-height:29px!important;
    padding:0!important;
    border:0!important;
    border-radius:7px!important;
    background:transparent!important;
    color:#f8cb58!important;
    font-size:1.24rem!important;
    line-height:1!important;
    touch-action:manipulation;
  }

  body:not(.owner-admin-body)
  #bt-r33-zoom button:focus-visible {
    outline:2px solid #ffe3a0!important;
    outline-offset:1px!important;
  }

  body:not(.owner-admin-body)
  #bt-r33-zoom output {
    display:inline-block!important;
    min-width:38px!important;
    font-size:.78rem!important;
    text-align:center!important;
  }

  /* Three products across in Compact view. */
  html body.homepage-reference
  #listingGrid.listing-grid[data-view-mode="compact"] {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-flow:row!important;

    /*
     * Seven rows, each 312px tall.
     * Extra items scroll vertically within the catalog.
     */
    grid-auto-rows:312px!important;
    gap:8px!important;
    max-height:2246px!important;
    height:auto!important;

    align-content:start!important;
    align-items:stretch!important;

    width:100%!important;
    min-width:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;

    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain;

    scrollbar-gutter:stable;
    scrollbar-width:thin;
    scrollbar-color:#c8a14a #111114;

    padding:4px 5px 10px 2px!important;
    box-sizing:border-box!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .listing-card {
    display:flex!important;
    flex-direction:column!important;
    min-width:0!important;
    max-width:100%!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
    border-radius:10px!important;
    box-sizing:border-box!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .image-wrap {
    position:relative!important;
    display:block!important;
    width:100%!important;
    height:100px!important;
    min-height:100px!important;
    max-height:100px!important;
    aspect-ratio:auto!important;
    flex:none!important;
    overflow:hidden!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .image-wrap > a {
    display:grid!important;
    place-items:center!important;
    width:100%!important;
    height:100%!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .image-wrap > a > img {
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
    padding:2px!important;
  }

  /* Product labels are compact without editing the listing. */
  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-body {
    display:flex!important;
    flex-direction:column!important;
    flex:1 1 auto!important;
    min-width:0!important;
    min-height:0!important;
    gap:4px!important;
    padding:6px 5px 8px!important;
    overflow:hidden!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-meta {
    font-size:.55rem!important;
    line-height:1.2!important;
    max-height:2.4em!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    letter-spacing:0!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-meta span:not(:first-child) {
    display:none!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .listing-card h3 {
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:3!important;
    min-height:0!important;
    max-height:3.6em!important;
    overflow:hidden!important;
    overflow-wrap:anywhere!important;
    font-family:Georgia,serif!important;
    font-size:.76rem!important;
    font-weight:650!important;
    line-height:1.2!important;
    margin:0!important;
  }

  /* One gold price, aligned left. */
  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-body > span.price {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    align-self:flex-start!important;
    justify-self:start!important;
    width:fit-content!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:27px!important;
    margin:3px auto 5px 0!important;
    padding:4px 5px!important;
    background:#f5ca5e!important;
    color:#13100b!important;
    -webkit-text-fill-color:#13100b!important;
    border-radius:7px!important;
    font-size:.92rem!important;
    font-weight:900!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }

  /*
   * Full descriptions remain on item detail pages.
   * Compact view uses its space for photos and actions.
   */
  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-copy,

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .purchase-note,

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  details.compact-description {
    display:none!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-actions {
    display:flex!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    min-width:0!important;
    gap:5px!important;
    margin-top:auto!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-actions .button {
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:29px!important;
    margin:0!important;
    padding:5px 3px!important;
    border-radius:7px!important;
    font-size:.65rem!important;
    line-height:1.15!important;
    font-weight:750!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    text-align:center!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .favorite-toggle {
    width:24px!important;
    min-width:24px!important;
    height:24px!important;
    min-height:24px!important;
    top:3px!important;
    right:3px!important;
    font-size:1.08rem!important;
  }

  /* Avoid photo-navigation dots crowding three-column cards. */
  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .gallery-dots {
    display:none!important;
  }

  /* Gold arrows without black circular backgrounds. */
  html body:not(.owner-admin-body)
  .listing-carousel .gallery-arrow,

  html body.item-page-body
  .product-main-carousel .gallery-arrow {
    appearance:none!important;
    -webkit-appearance:none!important;

    display:grid!important;
    place-items:center!important;

    position:absolute!important;
    top:50%!important;
    transform:translateY(-50%)!important;

    width:30px!important;
    min-width:30px!important;
    max-width:30px!important;
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;

    margin:0!important;
    padding:0!important;

    border:0!important;
    border-radius:0!important;

    background:transparent!important;
    background-image:none!important;

    color:#ffd05d!important;
    -webkit-text-fill-color:#ffd05d!important;

    font-size:1.55rem!important;
    font-weight:900!important;
    line-height:1!important;

    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;

    text-shadow:
      0 1px 3px rgba(0,0,0,.95),
      0 0 2px rgba(0,0,0,.95)!important;

    z-index:5!important;
    cursor:pointer!important;
    touch-action:manipulation;
  }

  html body:not(.owner-admin-body)
  .listing-carousel .gallery-arrow-prev,

  html body.item-page-body
  .product-main-carousel .gallery-arrow-prev {
    left:1px!important;
    right:auto!important;
  }

  html body:not(.owner-admin-body)
  .listing-carousel .gallery-arrow-next,

  html body.item-page-body
  .product-main-carousel .gallery-arrow-next {
    right:1px!important;
    left:auto!important;
  }

  html body:not(.owner-admin-body)
  .listing-carousel .gallery-arrow:focus-visible,

  html body.item-page-body
  .product-main-carousel .gallery-arrow:focus-visible {
    outline:2px solid #ffe5a2!important;
    outline-offset:0!important;
  }

  /* Featured and related-item scrolling arrows. */
  html body.homepage-reference
  .bt-featured-scroll-controls button,

  html body.item-page-body
  .bt-r39-rail-arrow {
    width:28px!important;
    min-width:28px!important;
    height:36px!important;
    min-height:36px!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#ffd05d!important;
    font-size:1.5rem!important;
    box-shadow:none!important;
    text-shadow:0 1px 3px #000!important;
  }

  /* A short guide below the scrollable catalog. */
  html body.homepage-reference
  .bt-r402-scroll-hint {
    display:block;
    padding:8px 4px;
    margin:3px 0 8px;
    text-align:center;
    color:#e6c77d;
    font-size:.73rem;
    line-height:1.4;
  }
}

.bt-r402-scroll-hint[hidden] {
  display:none!important;
}

@media(min-width:701px) {
  .bt-r402-scroll-hint {
    display:none!important;
  }
}

@media(prefers-reduced-motion:reduce) {
  html body.homepage-reference #listingGrid {
    scroll-behavior:auto!important;
  }
}

@media(max-width:390px) {
  html body.homepage-reference
  #listingGrid[data-view-mode="compact"] {
    gap:5px!important;
    padding-inline:2px!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-body {
    padding:5px 3px 7px!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .listing-card h3 {
    font-size:.69rem!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-actions .button {
    font-size:.60rem!important;
  }
}