/*
 BELLE'S TREASURES — R40.4.2

 Mobile-only storefront correction.
 Original inventory data and application code unchanged.
*/

.bt-r4042-mobile-message {
  display:none;
}

@media(max-width:700px){

  /*
   Short information notice.
   Desktop wording is preserved.
  */

  body.homepage-reference
  .bt-r4042-original-message {
    display:none!important;
  }

  body.homepage-reference
  .bt-r4042-mobile-message {
    display:block!important;

    padding:9px 11px!important;
    margin:8px 0 12px!important;

    border:1px solid #a48340!important;
    border-radius:9px!important;

    background:#111214!important;
    color:#eee5d4!important;

    font-size:.77rem!important;
    line-height:1.4!important;

    overflow-wrap:anywhere!important;
  }

  body.homepage-reference
  .bt-r4042-mobile-message a {
    color:#f6cb67!important;
    font-weight:800!important;
    text-decoration:underline!important;
  }

  /*
   Two Compact items per row.
   Normal page scrolling only.
  */

  html body.homepage-reference
  #listingGrid.listing-grid[data-view-mode="compact"] {
    display:grid!important;

    grid-template-columns:
      repeat(2,minmax(0,1fr))!important;

    grid-auto-flow:row!important;
    grid-auto-rows:auto!important;

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

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

    gap:9px!important;

    padding:4px 2px 12px!important;
    margin:0!important;

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

    overflow:visible!important;
    overflow-x:visible!important;
    overflow-y:visible!important;

    scroll-snap-type:none!important;
    scrollbar-gutter:auto!important;

    box-sizing:border-box!important;
  }

  body.homepage-reference
  .bt-r402-scroll-hint {
    display:none!important;
  }

  /*
   Product cards must never position their
   description or price over the photograph.
  */

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .listing-card {
    display:flex!important;
    flex-direction:column!important;

    position:relative!important;

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

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

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

    overflow:hidden!important;

    border-radius:10px!important;
    box-sizing:border-box!important;
  }

  /*
   Square image area prevents overly tall cards.
   Entire object is shown without cropping.
  */

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .listing-card>.image-wrap {
    display:block!important;

    position:relative!important;

    flex:0 0 auto!important;
    order:0!important;

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

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

    aspect-ratio:1/1!important;

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

    overflow:hidden!important;

    background:#0b0b0e!important;
  }

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

    width:100%!important;
    height:100%!important;

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

    overflow:hidden!important;
  }

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .listing-card>.image-wrap img {
    display:block!important;

    width:100%!important;
    height:100%!important;

    min-width:0!important;
    min-height:0!important;

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

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

    object-fit:contain!important;
    object-position:center!important;

    transform:none!important;

    box-sizing:border-box!important;
  }

  /*
   Hide floating availability badges in Compact.
   Item status is still available on item details.
  */

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

  /*
   The entire information block sits under
   the image, not inside its positioning layer.
  */

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .listing-card>.card-body {
    display:flex!important;
    flex-direction:column!important;

    position:relative!important;
    order:1!important;
    flex:1 1 auto!important;

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

    transform:none!important;

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

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

    padding:8px 7px 9px!important;
    margin:0!important;

    gap:5px!important;

    overflow:visible!important;

    background:#090a0c!important;
    box-sizing:border-box!important;
  }

  /* Smaller category labels */

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-meta {
    display:block!important;

    position:static!important;

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

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

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

    color:#ddba6b!important;

    font-size:.59rem!important;
    line-height:1.3!important;
    letter-spacing:0!important;

    overflow-wrap:anywhere!important;
  }

  /* Product title below image */

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .listing-card h3 {
    display:-webkit-box!important;

    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:4!important;

    position:static!important;

    width:100%!important;

    height:auto!important;
    min-height:0!important;
    max-height:4.8em!important;

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

    font-family:Georgia,serif!important;
    font-size:clamp(.79rem,3.1vw,.94rem)!important;
    font-weight:600!important;
    line-height:1.2!important;

    color:#f2ece0!important;

    overflow:hidden!important;
    overflow-wrap:anywhere!important;
  }

  /* Smaller gold price tag */

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-body>span.price {
    display:inline-flex!important;

    position:static!important;

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

    align-self:flex-start!important;
    justify-self:start!important;

    flex:0 0 auto!important;

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

    height:auto!important;
    min-height:24px!important;
    max-height:none!important;

    margin:3px auto 4px 0!important;
    padding:3px 6px!important;

    border-radius:6px!important;

    background:#edc45f!important;
    color:#151109!important;
    -webkit-text-fill-color:#151109!important;

    font-size:.89rem!important;
    font-weight:850!important;
    line-height:1.1!important;

    letter-spacing:0!important;
    white-space:nowrap!important;

    box-shadow:none!important;
    transform:none!important;
  }

  /*
   Restore Expand description.
   The existing native <details> element
   already contains the real item description.
  */

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

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

    position:static!important;

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

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

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

    overflow:visible!important;

    color:#ded4c4!important;

    font-size:.72rem!important;
    line-height:1.4!important;
  }

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

    padding:4px 2px!important;
    margin:0!important;

    min-height:27px!important;

    color:#f5d37d!important;

    font-size:.7rem!important;
    font-weight:750!important;
    line-height:1.25!important;

    cursor:pointer!important;
    pointer-events:auto!important;

    white-space:normal!important;
  }

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

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

    width:100%!important;

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

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

    color:#ddd4c3!important;

    font-size:.73rem!important;
    line-height:1.45!important;

    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

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

  /*
   Smaller buttons, with sufficient space
   to remain usable on a touchscreen.
  */

  html body.homepage-reference
  #listingGrid[data-view-mode="compact"]
  .card-actions {
    display:flex!important;
    flex-direction:column!important;

    position:static!important;

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

    height:auto!important;

    gap:5px!important;

    padding:5px 0 0!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;

    position:static!important;

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

    height:auto!important;
    min-height:35px!important;
    max-height:none!important;

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

    border-radius:7px!important;

    font-size:.71rem!important;
    font-weight:750!important;
    line-height:1.15!important;

    text-align:center!important;
    white-space:normal!important;

    overflow-wrap:anywhere!important;
    box-sizing:border-box!important;
  }

  /* Light gold gallery arrows */

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

  html body.item-page-body
  .product-main-carousel .gallery-arrow {
    display:grid!important;
    place-items:center!important;

    position:absolute!important;

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

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

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

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

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

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

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

    font-size:1.5rem!important;
    font-weight:900!important;

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

    text-shadow:0 1px 3px #000!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;
  }

  /* Featured price tags slightly smaller */

  html body.homepage-reference
  #featuredGrid .card-body>span.price {
    min-width:0!important;
    min-height:24px!important;

    padding:3px 6px!important;

    font-size:.9rem!important;
    line-height:1.1!important;
  }

  /*
   Existing header, mobile search, and Zoom
   intentionally retain their current code.
  */
}

@media(max-width:350px){

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

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

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