
/* =========================================================
   FAM STYLE - Floating Site Tools
   Mobile: tools are intentionally placed on the LEFT side
   so they never overlap the product-filter floating button.
========================================================= */

.fam-floating-tools {
    --fam-contact-1: #9d6646;
    --fam-contact-2: #b57b5b;
    --fam-faq-1: #4f46e5;
    --fam-faq-2: #6366f1;

    position: fixed;
    left: 18px;
    bottom: 24px;
    z-index: 2147483000;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;

    direction: ltr;
    font-family: inherit;
    isolation: isolate;
}

/* Floating round buttons */
.fam-floating-button {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;

    border: 0;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;

    padding: 0;
    cursor: pointer;

    color: #fff;
    font-family: inherit;

    box-shadow:
        0 10px 28px rgba(0, 0, 0, .16),
        0 2px 7px rgba(0, 0, 0, .10);

    transition:
        transform .22s ease,
        box-shadow .22s ease,
        filter .22s ease;
}

.fam-floating-button:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, .20),
        0 3px 9px rgba(0, 0, 0, .12);
}

.fam-floating-button:active {
    transform: scale(.96);
}

.fam-floating-button i {
    font-size: 22px;
    line-height: 1;
}

.fam-floating-button span {
    font-size: 8px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

/* Contact / social button - requested brown palette */
.fam-social-button {
    background: linear-gradient(
        145deg,
        var(--fam-contact-2) 0%,
        var(--fam-contact-1) 55%,
        #865136 100%
    );
}

.fam-social-button:hover {
    filter: brightness(1.04);
}

/* FAQ button */
.fam-faq-button {
    background: linear-gradient(
        145deg,
        var(--fam-faq-2) 0%,
        var(--fam-faq-1) 100%
    );
}

/* Panels */
.fam-floating-links-panel,
.fam-faq-panel {
    position: fixed;

    left: 18px;
    bottom: 24px;

    width: min(330px, calc(100vw - 36px));
    max-height: min(560px, calc(100vh - 48px));

    overflow: hidden;

    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 20px;

    box-shadow: 0 20px 55px rgba(0, 0, 0, .18);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(16px) scale(.96);
    transform-origin: bottom left;

    transition:
        opacity .22s ease,
        transform .22s ease,
        visibility .22s ease;

    z-index: 2147483002;
    direction: rtl;
}

.fam-floating-links-panel.active,
.fam-faq-panel.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Make sure only one panel is visually in front */
.fam-floating-links-panel {
    border-top: 3px solid var(--fam-contact-1);
}

.fam-faq-panel {
    border-top: 3px solid var(--fam-faq-1);
}

/* Panel headers */
.fam-floating-panel-title,
.fam-faq-header {
    min-height: 62px;
    padding: 13px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.fam-floating-panel-title span {
    color: #222;
    font-size: 13px;
    font-weight: 800;
}

.fam-faq-header small {
    display: block;
    color: #999;
    font-size: 9px;
    margin-bottom: 4px;
}

.fam-faq-header strong {
    display: block;
    color: #222;
    font-size: 13px;
}

.fam-floating-close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;

    border: 0;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f6f6f6;
    color: #555;
    cursor: pointer;

    transition: .2s ease;
}

.fam-floating-close:hover {
    background: #eee;
    color: #111;
}

/* Social links */
.fam-floating-links-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 10px;
}

.fam-floating-link {
    min-height: 54px;
    padding: 8px 10px;

    display: flex;
    align-items: center;
    gap: 10px;

    color: #222 !important;
    text-decoration: none !important;

    border-radius: 13px;

    transition: background .18s ease, transform .18s ease;
}

.fam-floating-link:hover {
    background: #f8f5f3;
    transform: translateX(-2px);
}

.fam-floating-link > span:not(.fam-floating-link-icon) {
    flex: 1;
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

.fam-floating-link-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: #f4eee9;
    color: var(--fam-contact-1);

    font-size: 19px;
}

.fam-floating-link-icon i {
    font-size: 19px;
    line-height: 1;
}

.fam-floating-arrow {
    color: #aaa;
    font-size: 17px;
}

.fam-floating-empty {
    padding: 22px 14px;
    text-align: center;
    color: #999;
    font-size: 10px;
}

/* FAQ */
.fam-faq-list {
    max-height: 430px;
    overflow-y: auto;
    padding: 8px;
}

.fam-faq-question {
    width: 100%;
    min-height: 52px;

    border: 0;
    border-bottom: 1px solid #f2f2f2;

    background: #fff;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 11px 8px;

    color: #222;
    text-align: right;
    font-family: inherit;

    cursor: pointer;
}

.fam-faq-question span {
    flex: 1;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.8;
}

.fam-faq-question i {
    width: 28px;
    height: 28px;
    min-width: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f1f1ff;
    color: var(--fam-faq-1);

    transition: transform .2s ease;
}

.fam-faq-question.active i {
    transform: rotate(45deg);
}

.fam-faq-answer {
    display: none;

    padding: 3px 12px 13px;

    color: #777;
    font-size: 10px;
    line-height: 2.1;

    background: #fafafa;
    border-radius: 0 0 10px 10px;
}

.fam-faq-answer.active {
    display: block;
}

/* =========================================================
   MOBILE
   Product page already has its own filter button on the RIGHT.
   Keep both floating tools completely on the LEFT.
========================================================= */

@media (max-width: 767.98px) {

    .fam-floating-tools {
        left: 14px;
        right: auto;

        bottom: calc(16px + env(safe-area-inset-bottom));
        gap: 10px;
    }

    .fam-floating-button {
        width: 54px;
        height: 54px;
        min-width: 54px;
        min-height: 54px;
    }

    .fam-floating-button i {
        font-size: 20px;
    }

    .fam-floating-button span {
        font-size: 7px;
    }

    .fam-floating-links-panel,
    .fam-faq-panel {
        left: 14px;
        right: auto;
        bottom: calc(16px + env(safe-area-inset-bottom));

        width: calc(100vw - 28px);
        max-height: calc(100vh - 32px);

        transform-origin: bottom left;
    }

    /*
       While a panel is open the buttons are behind it.
       This prevents accidental taps on the floating buttons.
    */
    .fam-floating-links-panel.active ~ .fam-floating-button,
    .fam-faq-panel.active ~ .fam-floating-button {
        pointer-events: none;
    }

    /* Extra protection against the AllProduct filter button */
    .filter-mobile-btn {
        z-index: 2147482000 !important;
    }

    .fam-floating-tools {
        z-index: 2147483000 !important;
    }
}

/* Very small phones */
@media (max-width: 380px) {

    .fam-floating-tools {
        left: 10px;
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .fam-floating-button {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
    }

    .fam-floating-links-panel,
    .fam-faq-panel {
        left: 10px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: calc(100vw - 20px);
    }
}
