/* ==========================================================================
   India Pet Shop — mobile app shell
   Makes the site feel like a native app on phones and tablets: bottom tab
   bar, touch feedback, compact header, collapsible footer, install prompt,
   page-loading bar and safe-area support for notched phones.
   Loaded after header.css so it can override it.
   ========================================================================== */

:root {
    --ab-h: 62px;
    --ab-safe-bottom: env(safe-area-inset-bottom, 0px);
    --ab-safe-top: env(safe-area-inset-top, 0px);
}

/* ---------- Page-loading bar (all screen sizes) ---------- */

.ab-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 10200;
    background: linear-gradient(90deg, var(--hm-primary), var(--hm-pink));
    box-shadow: 0 0 10px rgba(46, 125, 50, 0.5);
    opacity: 0;
    pointer-events: none;
}

.ab-progress.is-loading {
    opacity: 1;
    width: 85%;
    transition: width 6s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s ease;
}

.ab-progress.is-done {
    opacity: 0;
    width: 100%;
    transition: width 0.2s ease, opacity 0.3s ease 0.15s;
}

/* Hidden on desktop */
.sh-ticker,
.ab-nav,
.ab-install,
.sh-back {
    display: none;
}

/* ==========================================================================
   Phones & tablets
   ========================================================================== */

@media (max-width: 991px) {
    /* ---------- Native feel ---------- */

    html {
        -webkit-tap-highlight-color: transparent;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        padding-bottom: calc(var(--ab-h) + var(--ab-safe-bottom));
        overscroll-behavior-x: none;
    }

    a,
    button,
    input,
    select,
    textarea,
    label,
    [role="button"] {
        touch-action: manipulation;
    }

    /* App chrome is not text to select or long-press */
    .sh,
    .ab-nav,
    .ab-install,
    .hm-btn,
    .sh-drawer,
    button {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }

    img {
        -webkit-user-drag: none;
    }

    /* Swipeable rows scroll without a visible scrollbar, like an app */
    .hm-row,
    .hm-strip,
    .hm-brands,
    .pd-related__row,
    .ls-chips {
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .hm-row::-webkit-scrollbar,
    .hm-strip::-webkit-scrollbar,
    .hm-brands::-webkit-scrollbar,
    .pd-related__row::-webkit-scrollbar,
    .ls-chips::-webkit-scrollbar {
        display: none;
    }

    /* The bottom bar replaces the "back to top" button */
    .go-top {
        display: none !important;
    }

    /* Toasts and floating buttons sit above the tab bar */
    .cd-toast,
    .pg-toast,
    .ips-cartpage .cd-toast {
        bottom: calc(var(--ab-h) + 16px + var(--ab-safe-bottom)) !important;
    }

    .whatsapp,
    .float {
        bottom: calc(var(--ab-h) + 16px + var(--ab-safe-bottom)) !important;
    }

    /* ---------- Header: compact app bar ---------- */

    /* Scrolling offers bar above the header. The header is sticky with
       top: -var(--sh-top-h), so this bar scrolls away and the main bar stays. */
    :root {
        --sh-top-h: 32px;
    }

    .sh-top__inner {
        display: none;
    }

    .sh-ticker {
        display: flex;
        align-items: center;
        height: 100%;
        overflow: hidden;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
        mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    }

    .sh-ticker__track {
        display: flex;
        width: max-content;
        animation: sh-ticker 28s linear infinite;
    }

    .sh-ticker:active .sh-ticker__track {
        animation-play-state: paused;
    }

    .sh-ticker__list {
        display: flex;
        flex-shrink: 0;
    }

    .sh-ticker__list li {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 0 18px;
        font-size: 12px;
        font-weight: 500;
        white-space: nowrap;
        position: relative;
    }

    /* Small dot between messages */
    .sh-ticker__list li::after {
        content: '';
        position: absolute;
        right: -2px;
        top: 50%;
        width: 4px;
        height: 4px;
        margin-top: -2px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.45);
    }

    .sh-ticker__list i {
        color: var(--hm-yellow);
        font-size: 11px;
    }

    @keyframes sh-ticker {
        from {
            transform: translateX(0);
        }

        to {
            transform: translateX(-50%);
        }
    }

    .sh-main {
        /* Fixed height so the page never jumps when the bar turns into a pill */
        min-height: 58px;
        box-shadow: 0 1px 0 var(--hm-line);
        transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    }

    .sh-main__inner {
        height: 58px;
        gap: 2px;
        transition: transform 0.3s ease, margin 0.3s ease, padding 0.3s ease,
            height 0.3s ease, border-radius 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    }

    .sh-logo img {
        height: 36px;
        transition: height 0.3s ease;
    }

    .sh-logo {
        margin-left: 2px;
    }

    /* Icons: search, account, cart, menu (menu sits at the far right) */
    .sh-account {
        display: block;
    }

    .sh-login span {
        display: none;
    }

    .sh-icon {
        min-width: 38px;
        height: 38px;
        padding: 0 8px;
        font-size: 17px;
        transition: transform 0.12s ease, background-color 0.15s ease;
    }

    .sh-icon:active {
        transform: scale(0.88);
    }

    .sh-burger {
        order: 10;
        margin-left: 2px;
        color: var(--hm-cta) !important;
        font-size: 19px;
    }

    .sh-badge,
    .sh-badge--primary {
        background: var(--hm-cta);
    }

    .sh-account__menu {
        right: -40px;
    }

    /* ---------- Header on scroll: floating rounded bar ---------- */

    .sh.is-scrolled .sh-main {
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border-bottom-color: transparent;
        box-shadow: none;
    }

    .sh.is-scrolled .sh-main__inner {
        height: 52px;
        margin: 0 10px;
        padding: 0 8px 0 14px;
        border-radius: 999px;
        /* Solid (no backdrop blur) so the logo can blend into it */
        background: rgba(255, 249, 240, 0.98);
        border: 1px solid rgba(239, 230, 216, 0.9);
        box-shadow: 0 10px 30px rgba(38, 50, 56, 0.14);
        transform: translateY(6px);
    }

    .sh.is-scrolled .sh-logo img {
        height: 30px;
    }

    /* The logo file has a white box; blend it into the cream bar */
    .sh-logo img {
        mix-blend-mode: multiply;
    }

    /* Mobile search opens just under the floating bar */
    .sh.is-scrolled .sh-search {
        left: 0;
        right: 0;
    }

    /* Drawer slides above the tab bar and respects the notch */
    .sh-drawer__panel {
        padding-top: var(--ab-safe-top);
        padding-bottom: var(--ab-safe-bottom);
    }

    /* ---------- Bottom tab bar ---------- */

    .ab-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9980;
        height: calc(var(--ab-h) + var(--ab-safe-bottom));
        padding: 0 4px var(--ab-safe-bottom);
        background: rgba(255, 255, 255, 0.94);
        -webkit-backdrop-filter: saturate(180%) blur(16px);
        backdrop-filter: saturate(180%) blur(16px);
        border-top: 1px solid var(--hm-line);
        box-shadow: 0 -6px 24px rgba(38, 50, 56, 0.06);
        font-family: var(--hm-font);
        transition: transform 0.25s ease;
    }

    .ab-nav__item {
        flex: 1;
        min-width: 0;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--hm-muted) !important;
        text-decoration: none !important;
        font-size: 11px;
        font-weight: 600;
        line-height: 1;
    }

    .ab-nav__icon {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 30px;
        border-radius: 999px;
        font-size: 19px;
        transition: background-color 0.2s ease, transform 0.15s ease;
    }

    .ab-nav__label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .ab-nav__item.is-active {
        color: var(--hm-primary) !important;
    }

    .ab-nav__item.is-active .ab-nav__icon {
        background: var(--hm-primary-soft);
    }

    .ab-nav__item:active .ab-nav__icon {
        transform: scale(0.86);
    }

    .ab-nav__badge {
        position: absolute;
        top: -3px;
        right: 6px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 999px;
        border: 2px solid var(--hm-white);
        background: var(--hm-pink);
        color: var(--hm-white);
        font-size: 10px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: content-box;
    }

    .ab-nav__badge[hidden] {
        display: none;
    }

    /* Hidden while typing so the keyboard has room */
    html.ab-typing .ab-nav,
    html.ab-typing .ab-install {
        transform: translateY(110%);
    }

    /* Product, checkout pages have their own bottom action bar */
    body.pd-page .ab-nav,
    body.co-page .ab-nav {
        display: none;
    }

    body.pd-page,
    body.co-page {
        padding-bottom: 0;
    }

    /* Listing: the Filter / Sort bar floats above the tab bar */
    body.ls-has-mbar .ls-mbar {
        bottom: calc(var(--ab-h) + 10px + var(--ab-safe-bottom));
    }

    body.ls-has-mbar .whatsapp,
    body.ls-has-mbar .float {
        bottom: calc(var(--ab-h) + 84px + var(--ab-safe-bottom)) !important;
    }

    /* ---------- Touch feedback ---------- */

    .hm-btn,
    .hm-card,
    .hm-mini,
    .hm-tile,
    .hm-brand,
    .pd-btn,
    .co-pay-btn,
    .ls-mbar button,
    .sh-drawer__nav a,
    .sh-drawer__nav summary {
        transition: transform 0.12s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    }

    .hm-btn:active,
    .pd-btn:active,
    .co-pay-btn:active,
    .ls-mbar button:active {
        transform: scale(0.96);
    }

    .hm-card:active,
    .hm-mini:active,
    .hm-tile:active,
    .hm-brand:active {
        transform: scale(0.98);
    }

    .sh-drawer__nav a:active,
    .sh-drawer__nav summary:active {
        background: var(--hm-bg-soft);
    }

    /* ---------- Footer: compact, collapsible like an app's "More" page ---------- */

    .sf {
        padding-top: 24px;
        padding-bottom: 0;
    }

    .sf-news {
        border-radius: 20px;
        padding: 20px;
        margin-bottom: 20px;
    }

    .sf-news h2 {
        font-size: 18px;
    }

    .sf-grid {
        display: block;
        padding-bottom: 12px;
    }

    .sf-brand {
        text-align: center;
        padding-bottom: 18px;
    }

    .sf-brand p {
        display: none;
    }

    .sf-logo img {
        height: 48px;
        margin: 0 auto 10px;
    }

    .sf-social {
        justify-content: center;
        margin-top: 0;
    }

    .sf-col {
        gap: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .sf-col h3 {
        position: relative;
        margin: 0;
        padding: 16px 28px 16px 0;
        cursor: pointer;
    }

    .sf-col h3::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 12px;
        position: absolute;
        right: 4px;
        top: 50%;
        transform: translateY(-50%);
        transition: transform 0.2s ease;
        opacity: 0.7;
    }

    .sf-col.is-open h3::after {
        transform: translateY(-50%) rotate(180deg);
    }

    .sf-col > a,
    .sf-col > span {
        display: none;
        padding: 9px 0;
    }

    .sf-col.is-open > a,
    .sf-col.is-open > span {
        display: flex;
    }

    .sf-col.is-open {
        padding-bottom: 10px;
    }

    .sf-bottom__inner {
        padding-top: 14px;
        padding-bottom: 14px;
        gap: 10px;
    }

    /* ---------- Install prompt ---------- */

    .ab-install {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(var(--ab-h) + 10px + var(--ab-safe-bottom));
        z-index: 9985;
        padding: 12px 12px 12px 14px;
        border-radius: 18px;
        background: var(--hm-ink);
        color: var(--hm-white);
        font-family: var(--hm-font);
        box-shadow: 0 16px 40px rgba(38, 50, 56, 0.35);
        transform: translateY(0);
        animation: ab-rise 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
        transition: transform 0.25s ease;
    }

    .ab-install[hidden] {
        display: none;
    }

    body.pd-page .ab-install,
    body.co-page .ab-install,
    body.ls-has-mbar .ab-install {
        display: none;
    }

    .ab-install img {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        flex-shrink: 0;
    }

    .ab-install__text {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
        line-height: 1.3;
    }

    .ab-install__text strong {
        font-size: 14px;
    }

    .ab-install__text span {
        font-size: 12px;
        opacity: 0.8;
    }

    .ab-install__btn {
        border: 0;
        border-radius: 999px;
        background: var(--hm-white);
        color: var(--hm-primary);
        font: inherit;
        font-size: 13px;
        font-weight: 700;
        padding: 9px 16px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .ab-install__btn[hidden] {
        display: none;
    }

    .ab-install__close {
        border: 0;
        background: transparent;
        color: var(--hm-white);
        opacity: 0.7;
        width: 30px;
        height: 30px;
        padding: 0;
        font-size: 16px;
        cursor: pointer;
        flex-shrink: 0;
    }

    @keyframes ab-rise {
        from {
            transform: translateY(30px);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* iPhone: inputs under 16px make Safari zoom the page on focus */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 991px) {
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
        select,
        textarea {
            font-size: 16px !important;
        }
    }
}

/* No hover "lift" effects on touch screens (they stick after a tap) */
@media (hover: none) {
    .hm-btn:hover,
    .hm-card:hover,
    .hm-tile:hover,
    .hm-brand:hover {
        transform: none;
    }
}

/* ==========================================================================
   Installed app (opened from the home screen)
   ========================================================================== */

html.ab-standalone body {
    overscroll-behavior-y: none;
}

html.ab-standalone .sh-main {
    padding-top: var(--ab-safe-top);
}

/* No browser back button in an installed iPhone app: show our own */
html.ab-standalone.ab-can-back .sh-back {
    display: inline-flex;
}

html.ab-standalone.ab-can-back .sh-logo {
    margin-left: 0;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .sh-ticker__track {
        animation-duration: 80s;
    }

    .ab-progress,
    .ab-nav,
    .ab-nav__icon,
    .ab-install {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   "How to install" guide sheet (bottom sheet on phones, dialog on desktop)
   ========================================================================== */

.ab-sheet {
    position: fixed;
    inset: 0;
    z-index: 10150;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-family: var(--hm-font);
    color: var(--hm-ink);
}

.ab-sheet[hidden] {
    display: none;
}

.ab-sheet__overlay {
    position: absolute;
    inset: 0;
    background: rgba(38, 50, 56, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ab-sheet__panel {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: var(--hm-white);
    border-radius: 24px 24px 0 0;
    padding: 12px 22px calc(22px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -16px 40px rgba(38, 50, 56, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.ab-sheet.is-open .ab-sheet__overlay {
    opacity: 1;
}

.ab-sheet.is-open .ab-sheet__panel {
    transform: none;
}

html.ab-sheet-open body {
    overflow: hidden;
}

.ab-sheet__grip {
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 16px;
    border-radius: 4px;
    background: var(--hm-line);
}

.ab-sheet__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--hm-bg-soft);
    color: var(--hm-ink);
    cursor: pointer;
}

.ab-sheet__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-right: 36px;
}

.ab-sheet__head img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
}

.ab-sheet__head h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 2px;
}

.ab-sheet__head p {
    font-size: 13px;
    color: var(--hm-muted);
    margin: 0;
}

.ab-sheet__steps {
    list-style: none;
    counter-reset: ab-step;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ab-sheet__steps li {
    counter-increment: ab-step;
    position: relative;
    padding: 12px 14px 12px 50px;
    border-radius: 14px;
    background: var(--hm-cream);
    border: 1px solid var(--hm-line);
    font-size: 14px;
    line-height: 1.5;
}

.ab-sheet__steps li::before {
    content: counter(ab-step);
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--hm-primary);
    color: var(--hm-white);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ab-sheet__steps i {
    color: var(--hm-primary);
}

.ab-sheet__done {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 14px;
    background: var(--hm-cta);
    color: var(--hm-white);
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}

@media (min-width: 768px) {
    .ab-sheet {
        align-items: center;
    }

    .ab-sheet__panel {
        border-radius: 24px;
        padding-bottom: 22px;
        transform: translateY(20px) scale(0.97);
        opacity: 0;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .ab-sheet.is-open .ab-sheet__panel {
        opacity: 1;
    }

    .ab-sheet__grip {
        display: none;
    }
}

/* ==========================================================================
   Cookie permission banner
   Phones: card above the tab bar. Desktop: card in the bottom-left corner.
   ========================================================================== */

.ck {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 10120;
    width: min(420px, calc(100% - 32px));
    background: var(--hm-white);
    color: var(--hm-ink);
    font-family: var(--hm-font);
    border: 1px solid var(--hm-line);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(38, 50, 56, 0.22);
    padding: 18px 18px 16px;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.25s ease;
}

.ck[hidden] {
    display: none;
}

.ck.is-open {
    transform: none;
    opacity: 1;
}

.ck * {
    box-sizing: border-box;
}

.ck__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ck h2 {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    color: var(--hm-ink);
}

.ck__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--hm-yellow-soft);
    color: #b7791f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.ck p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--hm-muted);
    margin: 0 0 14px;
}

.ck p a {
    color: var(--hm-primary);
    font-weight: 600;
    text-decoration: underline;
}

.ck__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ck__btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.12s ease;
}

.ck__btn:active {
    transform: scale(0.96);
}

.ck__btn--primary {
    flex: 1;
    background: var(--hm-primary);
    color: var(--hm-white);
}

.ck__btn--primary:hover {
    background: var(--hm-primary-dark);
}

.ck__btn--ghost {
    background: var(--hm-bg-soft);
    color: var(--hm-ink);
}

.ck__btn--link {
    background: transparent;
    color: var(--hm-primary);
    padding-left: 8px;
    padding-right: 8px;
}

.ck__back {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--hm-bg-soft);
    color: var(--hm-ink);
    cursor: pointer;
    flex-shrink: 0;
}

.ck__opt {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--hm-line);
}

.ck__opt > div {
    flex: 1;
    min-width: 0;
}

.ck__opt strong {
    display: block;
    font-size: 14px;
}

.ck__opt span {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: var(--hm-muted);
}

.ck__prefs .ck__actions {
    margin-top: 6px;
}

/* Toggle switch */
.ck__switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}

.ck__switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.ck__switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d8cbb6;
    transition: background-color 0.2s ease;
    pointer-events: none;
}

.ck__switch span::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--hm-white);
    box-shadow: 0 2px 6px rgba(38, 50, 56, 0.25);
    transition: transform 0.2s ease;
}

.ck__switch input:checked + span {
    background: var(--hm-primary);
}

.ck__switch input:checked + span::after {
    transform: translateX(20px);
}

.ck__switch input:focus-visible + span {
    outline: 2px solid var(--hm-primary);
    outline-offset: 2px;
}

.ck__switch.is-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 991px) {
    .ck {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: calc(var(--ab-h) + 10px + var(--ab-safe-bottom));
    }

    /* Pages without the tab bar (product, checkout) */
    body.pd-page .ck,
    body.co-page .ck {
        bottom: calc(10px + var(--ab-safe-bottom));
    }

    /* One card at a time at the bottom */
    html.ck-open .ab-install {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ck {
        transition: none;
    }
}

/* ==========================================================================
   Floating WhatsApp chat button (right side)
   ========================================================================== */

.wa-fab {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 9970;
    display: flex;
    align-items: center;
    height: 56px;
    min-width: 56px;
    padding: 0 16px;
    border-radius: 999px;
    background: #25d366;
    color: #ffffff !important;
    font-family: var(--hm-font);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease, bottom 0.25s ease;
}

.wa-fab i {
    font-size: 28px;
    line-height: 1;
}

/* Soft pulse ring to draw the eye */
.wa-fab::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid #25d366;
    animation: wa-pulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    80%,
    100% {
        transform: scale(1.45);
        opacity: 0;
    }
}

/* Desktop: the label slides out on hover */
.wa-fab__label {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.3s ease, margin 0.3s ease;
}

.wa-fab:hover .wa-fab__label,
.wa-fab:focus-visible .wa-fab__label {
    max-width: 140px;
    margin-left: 10px;
}

.wa-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.55);
}

.wa-fab:active {
    transform: scale(0.94);
}

@media (max-width: 991px) {
    .wa-fab {
        right: 14px;
        bottom: calc(var(--ab-h) + 14px + var(--ab-safe-bottom));
        height: 52px;
        min-width: 52px;
        padding: 0 12px;
    }

    .wa-fab i {
        font-size: 27px;
    }

    .wa-fab__label {
        display: none;
    }

    /* Above the product / checkout action bar (no tab bar there) */
    body.pd-page .wa-fab,
    body.co-page .wa-fab {
        bottom: calc(84px + var(--ab-safe-bottom));
    }

    /* Above the listing Sort / Filter bar */
    body.ls-has-mbar .wa-fab {
        bottom: calc(var(--ab-h) + 82px + var(--ab-safe-bottom));
    }

    /* Out of the way while the install card or cookie banner is open */
    .ab-install:not([hidden]) ~ .wa-fab {
        bottom: calc(var(--ab-h) + 98px + var(--ab-safe-bottom));
    }

    html.ck-open .wa-fab,
    html.ab-typing .wa-fab,
    html.ab-sheet-open .wa-fab {
        opacity: 0;
        pointer-events: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wa-fab::before {
        animation: none;
        display: none;
    }
}
