/**
 * Arabira Smart Offers — refinement 3.6.2
 * Mobile filter drawer, first-tap cards and final toolbar alignment.
 */

/* -------------------------------------------------------------------------
 * Filter drawer: the white panel must always sit above its own light veil.
 * ---------------------------------------------------------------------- */
@media(max-width:767px){
  html.arso-filter-drawer-open,
  html.arso-filter-drawer-open body,
  body.arso-filter-drawer-open{
    overflow:hidden!important;
    overscroll-behavior:none!important;
  }

  .arso-filter-drawer{
    position:fixed!important;
    inset:0!important;
    z-index:2147483000!important;
    display:flex!important;
    align-items:flex-end!important;
    justify-content:center!important;
    width:100vw!important;
    height:100dvh!important;
    margin:0!important;
    padding:0!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    background:transparent!important;
    transform:none!important;
    filter:none!important;
    transition:opacity .2s ease,visibility .2s ease!important;
    isolation:isolate!important;
  }
  .arso-filter-drawer[hidden]{display:none!important}
  .arso-filter-drawer.is-open:not([hidden]){
    display:flex!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
  .arso-filter-drawer__backdrop{
    position:absolute!important;
    inset:0!important;
    z-index:1!important;
    display:block!important;
    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:rgba(42,27,37,.22)!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    box-shadow:none!important;
    opacity:1!important;
    visibility:visible!important;
  }
  .arso-filter-drawer__panel{
    position:relative!important;
    inset:auto!important;
    z-index:3!important;
    display:flex!important;
    width:100%!important;
    max-width:720px!important;
    max-height:min(86dvh,760px)!important;
    margin:0!important;
    padding:0!important;
    flex-direction:column!important;
    overflow:hidden!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:translate3d(0,105%,0)!important;
    border:1px solid #f0e2ea!important;
    border-bottom:0!important;
    border-radius:24px 24px 0 0!important;
    background:#fff!important;
    box-shadow:0 -18px 55px rgba(52,31,44,.22)!important;
    transition:transform .22s cubic-bezier(.2,.8,.2,1)!important;
  }
  .arso-filter-drawer.is-open .arso-filter-drawer__panel{
    transform:translate3d(0,0,0)!important;
  }
  .arso-filter-drawer__head{
    position:relative!important;
    z-index:2!important;
    display:flex!important;
    min-height:58px!important;
    padding:10px 14px!important;
    align-items:center!important;
    justify-content:space-between!important;
    flex:0 0 auto!important;
    border-bottom:1px solid #f0e5eb!important;
    background:#fff!important;
  }
  .arso-filter-drawer__body{
    position:relative!important;
    z-index:1!important;
    min-height:0!important;
    max-height:calc(86dvh - 58px)!important;
    padding:12px 12px calc(18px + env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    background:#fff!important;
    -webkit-overflow-scrolling:touch!important;
  }

  /* No page-wide blur/filter while the filter panel is open. */
  html.arso-filter-drawer-open body,
  html.arso-filter-drawer-open .website-wrapper,
  html.arso-filter-drawer-open .wd-page-wrapper,
  html.arso-filter-drawer-open .main-page-wrapper{
    filter:none!important;
    -webkit-filter:none!important;
  }
}

/* -------------------------------------------------------------------------
 * Product cards: one tap opens the product; WoodMart hover overlays cannot
 * steal the first touch. The plugin's own cart/wishlist controls remain live.
 * ---------------------------------------------------------------------- */
@media(max-width:767px){
  body.post-type-archive-product .product-grid-item,
  body.post-type-archive-product .wd-product,
  body.tax-product_cat .product-grid-item,
  body.tax-product_cat .wd-product,
  body.tax-product_tag .product-grid-item,
  body.tax-product_tag .wd-product{
    touch-action:manipulation!important;
  }
  body.post-type-archive-product .product-grid-item .wd-buttons,
  body.post-type-archive-product .wd-product .wd-buttons,
  body.tax-product_cat .product-grid-item .wd-buttons,
  body.tax-product_cat .wd-product .wd-buttons,
  body.tax-product_tag .product-grid-item .wd-buttons,
  body.tax-product_tag .wd-product .wd-buttons,
  body.post-type-archive-product .quick-shop-wrapper,
  body.tax-product_cat .quick-shop-wrapper,
  body.tax-product_tag .quick-shop-wrapper{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  body.post-type-archive-product a.product-image-link,
  body.post-type-archive-product .wd-entities-title a,
  body.tax-product_cat a.product-image-link,
  body.tax-product_cat .wd-entities-title a,
  body.tax-product_tag a.product-image-link,
  body.tax-product_tag .wd-entities-title a{
    position:relative!important;
    z-index:3!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }
}

/* -------------------------------------------------------------------------
 * Bottom navigation: six equal cells, slightly larger and perfectly centred.
 * ---------------------------------------------------------------------- */
@media(max-width:767px){
  .wd-toolbar.arso-toolbar-balanced,
  .woodmart-toolbar.arso-toolbar-balanced,
  .wd-bottom-toolbar.arso-toolbar-balanced{
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    align-items:stretch!important;
    width:100%!important;
    height:calc(76px + env(safe-area-inset-bottom))!important;
    min-height:76px!important;
    padding:4px 0 env(safe-area-inset-bottom)!important;
    gap:0!important;
  }
  .wd-toolbar.arso-toolbar-balanced>.wd-tools-element,
  .woodmart-toolbar.arso-toolbar-balanced>.wd-tools-element,
  .wd-bottom-toolbar.arso-toolbar-balanced>.wd-tools-element{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:36px 19px!important;
    align-content:center!important;
    align-items:center!important;
    justify-content:center!important;
    justify-items:center!important;
    width:100%!important;
    min-width:0!important;
    height:70px!important;
    min-height:70px!important;
    margin:0!important;
    padding:4px 0 3px!important;
    gap:2px!important;
    overflow:visible!important;
    text-align:center!important;
  }
  .wd-toolbar.arso-toolbar-balanced .wd-tools-icon,
  .woodmart-toolbar.arso-toolbar-balanced .wd-tools-icon,
  .wd-bottom-toolbar.arso-toolbar-balanced .wd-tools-icon{
    grid-row:1!important;
    grid-column:1!important;
    align-self:center!important;
    justify-self:center!important;
    display:grid!important;
    width:33px!important;
    height:33px!important;
    min-width:33px!important;
    min-height:33px!important;
    margin:0!important;
    padding:0!important;
    place-items:center!important;
    transform:none!important;
  }
  .wd-toolbar.arso-toolbar-balanced .wd-toolbar-label,
  .wd-toolbar.arso-toolbar-balanced .wd-tools-text,
  .woodmart-toolbar.arso-toolbar-balanced .wd-toolbar-label,
  .woodmart-toolbar.arso-toolbar-balanced .wd-tools-text,
  .wd-bottom-toolbar.arso-toolbar-balanced .wd-toolbar-label,
  .wd-bottom-toolbar.arso-toolbar-balanced .wd-tools-text{
    grid-row:2!important;
    grid-column:1!important;
    align-self:center!important;
    justify-self:center!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:17px!important;
    margin:0!important;
    padding:0 1px!important;
    overflow:visible!important;
    color:#211a20!important;
    font-size:9.55px!important;
    font-weight:900!important;
    letter-spacing:-.22px!important;
    line-height:17px!important;
    text-align:center!important;
    white-space:nowrap!important;
    transform:none!important;
  }
  .arso-category-toolbar-item .wd-toolbar-label,
  .arso-category-toolbar-item .wd-tools-text{
    font-size:9.15px!important;
    letter-spacing:-.35px!important;
  }

  /* Beauty Party: stable, fully pink, no pulse and no duplicate badge. */
  .arso-beauty-toolbar-item .wd-tools-icon{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
    border:0!important;
    border-radius:13px!important;
    background:transparent!important;
    color:#f23f9b!important;
    box-shadow:none!important;
    animation:none!important;
  }
  .arso-beauty-toolbar-item .wd-tools-icon::before,
  .arso-beauty-toolbar-item .wd-tools-icon::after{
    content:none!important;
    display:none!important;
    animation:none!important;
  }
  .arso-beauty-toolbar-item .arso-beauty-filled-icon{
    display:block!important;
    width:34px!important;
    height:34px!important;
    overflow:visible!important;
  }
  .arso-beauty-toolbar-item .wd-toolbar-label,
  .arso-beauty-toolbar-item .wd-tools-text{
    color:#cf2d7f!important;
  }

  /* Keep the product purchase bar above the slightly taller navigation. */
  .arso-sticky-purchase{
    bottom:calc(76px + env(safe-area-inset-bottom) + 7px)!important;
  }
}

@media(max-width:370px){
  .wd-toolbar.arso-toolbar-balanced .wd-toolbar-label,
  .wd-toolbar.arso-toolbar-balanced .wd-tools-text,
  .woodmart-toolbar.arso-toolbar-balanced .wd-toolbar-label,
  .woodmart-toolbar.arso-toolbar-balanced .wd-tools-text,
  .wd-bottom-toolbar.arso-toolbar-balanced .wd-toolbar-label,
  .wd-bottom-toolbar.arso-toolbar-balanced .wd-tools-text{
    font-size:8.9px!important;
    letter-spacing:-.3px!important;
  }
  .arso-category-toolbar-item .wd-toolbar-label,
  .arso-category-toolbar-item .wd-tools-text{
    font-size:8.55px!important;
  }
}
