/*
 BELLE'S TREASURES — R40.8

 Search before Shop, no Track Requests navigation tab,
 and a maximum five-dot gallery indicator.

 Does not alter product data, photo order, account
 forms, owner portal, or desktop navigation.
*/

/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

@media(max-width:700px) and (orientation:portrait){

  html body:not(.owner-admin-body)
  >header.site-header.deco-shell
  .bt-r406-nav-rail
  >nav.bt-r33-navigation.bt-r408-nav{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;

    justify-content:flex-start!important;
    align-items:center!important;

    gap:8px!important;
    padding:3px 8px!important;

    min-width:0!important;
    width:100%!important;
    max-width:100%!important;

    overflow-x:auto!important;
    overflow-y:hidden!important;

    scrollbar-width:none!important;
    -ms-overflow-style:none!important;

    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-x!important;

    scroll-snap-type:x proximity!important;
  }

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  nav.bt-r408-nav::-webkit-scrollbar{
    display:none!important;
    width:0!important;
    height:0!important;
  }

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >.bt-r406-nav-arrow{
    display:none!important;
  }

  /*
   Search is the first, readable item in the swipe row.
  */

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r408-nav
  >form.bt-r33-search{
    display:flex!important;

    position:relative!important;
    order:-20!important;

    flex:0 0 158px!important;
    flex-grow:0!important;
    flex-shrink:0!important;

    width:158px!important;
    min-width:158px!important;
    max-width:158px!important;

    height:36px!important;
    min-height:36px!important;

    padding:0 3px!important;
    margin:0!important;

    border:1px solid #ba954c!important;
    border-radius:999px!important;

    background:#111113!important;

    overflow:hidden!important;
    box-sizing:border-box!important;

    scroll-snap-align:start!important;
  }

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r408-nav
  >form.bt-r33-search input{
    display:block!important;

    position:static!important;

    flex:1 1 auto!important;

    width:auto!important;
    min-width:0!important;
    max-width:none!important;

    height:32px!important;
    min-height:32px!important;

    padding:4px 7px!important;

    border:0!important;

    opacity:1!important;
    visibility:visible!important;

    background:transparent!important;
    color:#fff!important;

    font-size:.76rem!important;

    pointer-events:auto!important;
  }

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r408-nav
  >form.bt-r33-search button{
    display:grid!important;
    place-items:center!important;

    position:static!important;

    flex:0 0 29px!important;

    width:29px!important;
    min-width:29px!important;

    height:30px!important;
    min-height:30px!important;

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

    border:0!important;
    background:transparent!important;

    color:#f5ce6f!important;

    opacity:1!important;
    pointer-events:auto!important;
  }

  /*
   Existing Shop, Requests and Account remain readable.
  */

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r408-nav>a{
    flex-shrink:0!important;
    white-space:nowrap!important;
  }

  /*
   Track Requests belongs in the Account page.
   Only hide that entry in mobile primary navigation.
   Do not hide any Account-page tracking controls.
  */

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r408-nav>a[href*="track.html"],

  html body:not(.owner-admin-body)
  .bt-r406-nav-rail
  >nav.bt-r408-nav>a.bt-r408-track-link{
    display:none!important;
  }
}

/* =========================================================
   SMART GALLERY DOTS — CUSTOMER STOREFRONT
   ========================================================= */

@media(max-width:700px){

  /*
   Show the indicator on the photo itself,
   not over the product title or price.
  */

  html body:not(.owner-admin-body)
  .listing-carousel .gallery-dots.bt-r408-dots,

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .listing-card .image-wrap
  .gallery-dots.bt-r408-dots,

  html body.homepage-reference
  #featuredGrid .gallery-dots.bt-r408-dots{
    display:flex!important;

    position:absolute!important;

    left:50%!important;
    right:auto!important;
    bottom:6px!important;
    top:auto!important;

    transform:translateX(-50%)!important;

    flex-direction:row!important;
    flex-wrap:nowrap!important;

    justify-content:center!important;
    align-items:center!important;

    width:max-content!important;
    min-width:0!important;
    max-width:calc(100% - 28px)!important;

    height:21px!important;
    min-height:21px!important;
    max-height:21px!important;

    gap:5px!important;

    padding:3px 8px!important;
    margin:0!important;

    border-radius:999px!important;
    border:1px solid rgba(225,182,89,.35)!important;

    background:rgba(10,10,12,.76)!important;

    box-shadow:none!important;

    overflow:hidden!important;
    white-space:nowrap!important;

    z-index:12!important;

    pointer-events:auto!important;

    box-sizing:border-box!important;
  }

  /*
   Gallery dot indicators on full item pages
   remain BELOW the main photograph.
  */

  html body:not(.owner-admin-body)
  .product-gallery-dots.bt-r408-dots{
    display:flex!important;

    position:relative!important;

    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;

    transform:none!important;

    justify-content:center!important;
    align-items:center!important;
    flex-wrap:nowrap!important;

    width:max-content!important;
    max-width:100%!important;

    min-height:24px!important;

    gap:6px!important;

    margin:8px auto!important;
    padding:5px 10px!important;

    border-radius:999px!important;

    background:rgba(12,12,14,.84)!important;
    border:1px solid rgba(225,182,89,.35)!important;

    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  /*
   Only the current moving window is visible.
   The original per-photo buttons remain in the DOM,
   retaining their existing click handlers.
  */

  html body:not(.owner-admin-body)
  .gallery-dots.bt-r408-dots
  .gallery-dot{
    display:none!important;
  }

  html body:not(.owner-admin-body)
  .gallery-dots.bt-r408-dots
  .gallery-dot.bt-r408-visible{
    display:block!important;

    appearance:none!important;
    -webkit-appearance:none!important;

    position:relative!important;

    flex:0 0 auto!important;

    width:6px!important;
    min-width:6px!important;
    max-width:6px!important;

    height:6px!important;
    min-height:6px!important;
    max-height:6px!important;

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

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

    background:#d4b56c!important;

    box-shadow:none!important;

    opacity:.75!important;

    cursor:pointer!important;

    transform:none!important;

    transition:
      width .14s ease,
      height .14s ease,
      background .14s ease,
      opacity .14s ease!important;
  }

  /*
   Active photograph: the largest gold dot.
  */

  html body:not(.owner-admin-body)
  .gallery-dots.bt-r408-dots
  .gallery-dot.bt-r408-active{
    width:11px!important;
    min-width:11px!important;
    max-width:11px!important;

    height:11px!important;
    min-height:11px!important;
    max-height:11px!important;

    background:#ffd672!important;
    opacity:1!important;
  }

  /*
   Distant photos: smaller, subtler dots.
   This makes the direction of additional photos clear.
  */

  html body:not(.owner-admin-body)
  .gallery-dots.bt-r408-dots
  .gallery-dot.bt-r408-far{
    width:4px!important;
    min-width:4px!important;
    max-width:4px!important;

    height:4px!important;
    min-height:4px!important;
    max-height:4px!important;

    opacity:.5!important;
  }

  html body:not(.owner-admin-body)
  .gallery-dots.bt-r408-dots
  .gallery-dot:focus-visible{
    outline:2px solid #ffe6a8!important;
    outline-offset:3px!important;
  }

  /*
   Vertical page scrolling is preserved.
   Horizontal touch gestures change the photograph.
  */

  html body:not(.owner-admin-body)
  .listing-carousel[data-card-gallery]{
    touch-action:pan-y!important;
  }

  html body:not(.owner-admin-body)
  .product-main-carousel{
    touch-action:pan-y!important;
  }
}

@media(prefers-reduced-motion:reduce){
  html body:not(.owner-admin-body)
  .gallery-dots.bt-r408-dots .gallery-dot{
    transition:none!important;
  }
}