/* Ravix Store 6.4.7 — independent, mobile-only product navigation + real cart.
   Keep the previous 6.4.5 CSS scroll-snap gallery and layered sheet untouched. */
.rvx-pdp-floating-tabs,.rvx-pdp-purchase-shelf{display:none}
@media (max-width:767px){
  body.single-product {
    --rvx-pdp-tabs-height:35px;
    --rvx-pdp-purchase-height:74px;
  }
  /* Child of the native sticky topbar: the tab row does not change its height,
     so the image/paper scroll offsets cannot jump when the row switches. */
  body.single-product .rvx-product-mobile-topbar{overflow:visible!important}
  body.single-product .rvx-pdp-floating-tabs{
    display:flex;box-sizing:border-box;position:absolute;
    inset-inline:0;top:100%;width:100%;height:var(--rvx-product-crumb-size,30px);
    margin:0;direction:rtl;align-items:stretch;justify-content:space-around;
    overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
    border:0;border-bottom:1px solid #e7e7e9;background:#fff;
    opacity:0;visibility:hidden;pointer-events:none;
    z-index:2;transition:opacity .12s ease,visibility 0s linear .12s;
    -webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;
  }
  body.single-product .rvx-pdp-floating-tabs::-webkit-scrollbar{display:none}
  body.single-product.rvx-pdp-tabs-on .rvx-pdp-floating-tabs{
    opacity:1;visibility:visible;pointer-events:auto;transition:opacity .12s ease;
  }
  body.single-product .rvx-pdp-floating-tabs a{
    flex:1 0 auto;display:flex;position:relative;align-items:center;justify-content:center;
    padding:0 clamp(7px,2vw,14px);height:100%;min-width:max-content;
    font-size:clamp(10px,2.8vw,12px);font-weight:650;line-height:1.2;
    color:#72757e;text-decoration:none!important;white-space:nowrap;
    background:#fff;border:0;box-shadow:none;
    -webkit-tap-highlight-color:transparent;
  }
  body.single-product .rvx-pdp-floating-tabs a.is-active {color:#20252b;font-weight:850}
  body.single-product .rvx-pdp-floating-tabs a.is-active::after{
    content:"";position:absolute;bottom:0;right:18%;left:18%;height:3px;
    border-radius:6px 6px 0 0;background:#252629;
  }
  body.single-product .rvx-pdp-floating-tabs a:focus-visible{
    outline:2px solid #2563eb!important;outline-offset:-3px;
  }
  body.single-product .rvx-pdp-floating-tabs a[aria-disabled="true"] {opacity:.5;cursor:default}
  /* Leave the original breadcrumb in its sticky slot, but swap its pixels for
     the tabs only AFTER the intro/seller sheet has crossed that slot. */
  body.single-product.rvx-pdp-tabs-on .rvx-single-product-main > .rvx-container > .rvx-breadcrumb{
    opacity:0!important;visibility:hidden!important;pointer-events:none!important;
  }
  body.single-product .rvx-single-product-main > .rvx-container > .rvx-breadcrumb{
    transition:opacity .1s ease;will-change:auto;
  }
  /* Do not draw two sets of tab navigation on mobile. The desktop navigation
     stays intact; its target sections are still in document flow. */
  body.single-product .rvx-product-sections-nav {display:none!important}
  body.single-product .rvx-product-section,
  body.single-product .rvx-product-qa,
  body.single-product .rvx-product-highlights,
  body.single-product .related.products,
  body.single-product #rvx-product-suggestions {
    scroll-margin-top:calc(var(--rvx-product-top-offset,0px) + var(--rvx-product-toolbar-size,50px) + var(--rvx-product-crumb-size,30px) + 12px)!important;
  }
  body.single-product.rvx-product-mobile-cart-shelf .rvx-single-product-main{
    padding-bottom:calc(var(--rvx-pdp-purchase-height) + 36px + env(safe-area-inset-bottom,0px))!important;
  }
  body.single-product .rvx-pdp-purchase-shelf{
    display:flex;box-sizing:border-box;position:fixed;
    bottom:0;inset-inline:0;left:0;right:0;z-index:180;
    width:100%;min-height:var(--rvx-pdp-purchase-height);
    padding:10px 13px max(10px,env(safe-area-inset-bottom,0px));
    margin:0;gap:12px;align-items:center;justify-content:space-between;
    direction:rtl;background:#fff;border:0;border-top:1px solid #e3e5e8;
    box-shadow:none;isolation:isolate;
  }
  body.single-product .rvx-pdp-purchase-shelf__button {
    flex:1 1 50%;width:50%;min-width:0;min-height:48px;max-height:52px;
    display:flex;align-items:center;justify-content:center;
    border:0;border-radius:9px;background:#ef4056;color:#fff;
    font:inherit;font-size:clamp(11px,3.35vw,14px);font-weight:850;
    text-align:center;padding:8px 7px;line-height:1.4;
    cursor:pointer;transition:background-color .15s ease;
    touch-action:manipulation;
  }
  body.single-product .rvx-pdp-purchase-shelf__button:hover:not(:disabled){background:#d92e45}
  body.single-product .rvx-pdp-purchase-shelf__button:active:not(:disabled){background:#c8263e}
  body.single-product .rvx-pdp-purchase-shelf__button:focus-visible{outline:3px solid #9fc1ff!important;outline-offset:2px}
  body.single-product .rvx-pdp-purchase-shelf__button:disabled{cursor:not-allowed;background:#adb2ba}
  body.single-product .rvx-pdp-purchase-shelf__button.is-loading{opacity:.72;cursor:progress}
  body.single-product .rvx-pdp-purchase-shelf__pricing {
    flex:1 1 50%;width:50%;min-width:0;display:flex;flex-direction:column;
    justify-content:center;align-items:flex-end;direction:rtl;text-align:left;
    padding:0 2px 0 0;gap:2px;line-height:1.3;font-variant-numeric:tabular-nums;
  }
  body.single-product .rvx-pdp-purchase-shelf__oldline{
    display:flex;direction:rtl;align-items:center;justify-content:flex-end;
    gap:5px;min-height:16px;width:100%;white-space:nowrap;
  }
  body.single-product .rvx-pdp-purchase-shelf__discount{
    background:#e12b3d;color:#fff;border-radius:999px;
    padding:2px 6px;font-size:11px;font-weight:800;line-height:1.2;
  }
  body.single-product .rvx-pdp-purchase-shelf__oldline del,
  body.single-product .rvx-pdp-purchase-shelf__pricing del{
    display:inline!important;text-decoration:line-through;color:#a8abb2;
    font-size:11px;font-weight:500;opacity:1;
  }
  body.single-product .rvx-pdp-purchase-shelf__pricing del .amount{font-size:inherit;color:inherit}
  body.single-product .rvx-pdp-purchase-shelf__current{
    font-size:clamp(15px,4.3vw,19px);font-weight:900;color:#191e29;
    white-space:nowrap;max-width:100%;line-height:1.3;
  }
  body.single-product .rvx-pdp-purchase-shelf__current .price,
  body.single-product .rvx-pdp-purchase-shelf__current ins {
    color:inherit;font-size:inherit;font-weight:inherit;text-decoration:none;
  }
  body.single-product .rvx-pdp-purchase-shelf__current .woocommerce-Price-amount{
    font-size:inherit!important;color:inherit!important;font-weight:inherit!important;
  }
  body.single-product .rvx-pdp-purchase-shelf__current .woocommerce-Price-currencySymbol{
    font-size:.57em;font-weight:650;white-space:nowrap;
  }
  body.single-product .rvx-pdp-purchase-shelf__current .price del{
    font-size:10px;display:inline;color:#a8abb2;
  }
  /* Hide only the native fixed action row, NOT the variation selectors or
     the form itself. Its real button still receives JS and Woo events. */
  body.single-product.rvx-product-mobile-cart-shelf .rvx-product-cart-wrap form.cart:not(.variations_form):not(.grouped_form){
    position:absolute!important;left:0!important;top:0!important;bottom:auto!important;
    right:auto!important;inset-inline:auto!important;z-index:-1!important;
    width:1px!important;height:1px!important;min-height:0!important;
    max-width:1px!important;max-height:1px!important;overflow:hidden!important;
    padding:0!important;margin:0!important;border:0!important;
    box-shadow:none!important;clip-path:inset(50%)!important;pointer-events:none!important;
  }
  body.single-product.rvx-product-mobile-cart-shelf .rvx-product-cart-wrap form.variations_form.cart .woocommerce-variation-add-to-cart{
    position:absolute!important;left:0!important;top:0!important;bottom:auto!important;
    right:auto!important;inset-inline:auto!important;z-index:-1!important;
    width:1px!important;height:1px!important;min-height:0!important;
    overflow:hidden!important;padding:0!important;margin:0!important;
    border:0!important;box-shadow:none!important;clip-path:inset(50%)!important;
    pointer-events:none!important;
  }
  body.single-product.rvx-product-mobile-cart-shelf .rvx-product-cart-wrap form.grouped_form{
    position:relative!important;bottom:auto!important;inset:auto!important;
    width:100%!important;box-shadow:none!important;border-top:0!important;
    padding:0!important;margin:0!important;background:#fff!important;
  }
}
@media (max-width:350px){
  body.single-product .rvx-pdp-purchase-shelf{gap:7px;padding-inline:9px}
  body.single-product .rvx-pdp-purchase-shelf__button{font-size:11px}
  body.single-product .rvx-pdp-purchase-shelf__current{font-size:14px}
  body.single-product .rvx-pdp-floating-tabs a{padding-inline:7px;font-size:10px}
}
@media (prefers-reduced-motion:reduce){
  body.single-product .rvx-pdp-floating-tabs,
  body.single-product .rvx-single-product-main > .rvx-container > .rvx-breadcrumb,
  body.single-product .rvx-pdp-purchase-shelf__button{transition:none!important}
}

/* Keep native cart behavior intact when the merchant disables the shelf. */
@media(max-width:767px){
  body.single-product.rvx-product-mobile-cart-static .rvx-pdp-purchase-shelf{display:none!important}
  body.single-product.rvx-product-mobile-cart-shelf .rvx-pdp-purchase-shelf{display:flex}
}
