/* Floating WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1050;
    text-decoration: none;
    transition: right .25s ease, transform .2s ease, box-shadow .2s ease;
}
.floating-whatsapp.shifted {
    right: 86px;
}
/* On the product view page the Share button occupies the base slot; sit the
   WhatsApp button to its left so the two never overlap. */
.floating-whatsapp.beside-share {
    right: 86px;
}
.floating-whatsapp:hover {
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
/* Footer-only label, sitting to the left of the circular button as a modern
   speech "tag" whose right edge points at the WhatsApp icon. Hidden until JS
   adds .show-label while the footer is in view. */
.floating-whatsapp-label {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    white-space: nowrap;
    text-align: left;
    background: #fff;
    color: #111827;
    padding: 9px 15px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: .1px;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.18));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
/* Tag point on the right edge, aimed at the WhatsApp icon. Inherits the
   parent's drop-shadow so the whole tag reads as one piece. */
.floating-whatsapp-label::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    width: 0;
    height: 0;
    transform: translateY(-50%);
    border-width: 8px 0 8px 10px;
    border-style: solid;
    border-color: transparent transparent transparent #fff;
}
.floating-whatsapp.show-label .floating-whatsapp-label {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}
.floating-whatsapp::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    animation: wa-pulse 1.8s infinite;
}
@keyframes wa-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
body.overflow-hidden .floating-whatsapp {
    display: none;
}
@media (max-width: 575.98px) {
    .floating-whatsapp { bottom: 100px; right: 20px; width: 40px; height: 40px; font-size: 1.25rem; }
    .floating-whatsapp.shifted { right: 70px; }
    .floating-whatsapp.beside-share { right: 70px; }
    .floating-whatsapp-label { right: calc(100% + 11px); padding: 7px 12px; font-size: 0.78rem; }
}

/* Floating Share Button */
.floating-share {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: #fff;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(55, 65, 81, 0.4);
    z-index: 1050;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.floating-share:hover,
.floating-share.active {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
body.overflow-hidden .floating-share {
    display: none;
}

/* Share Menu */
.share-menu {
    position: fixed;
    bottom: 170px;
    right: 30px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.share-option {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform .2s ease;
}
.share-option:hover {
    transform: scale(1.1);
    color: #fff;
}
#share-whatsapp { background: #25D366; }
#share-facebook { background: #1877F2; }
#share-telegram { background: #0088cc; }
#share-copy { background: #6B7280; }

body.overflow-hidden .share-menu {
    display: none !important;
}

@media (max-width: 575.98px) {
    .floating-share { bottom: 100px; right: 20px; width: 40px; height: 40px; font-size: 1.1rem; }
    .share-menu { bottom: 150px; right: 20px; }
    .share-option { width: 38px; height: 38px; font-size: 1rem; }
}
