/* Component: Product Card – Section Nav */

.product-card-slot {
    margin-bottom: 20px;
}

/* ── Wrapper (transparent, stacks card + progress) ─────────────────── */

.form-product-card {
    --card-mini-w: 440px;
    --card-thumb-w: 150px;
    --card-mini-thumb: 80px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ── Floating state (product page, JS-managed) ────────────────────── */

.form-product-card.is-floating {
    position: fixed;
    bottom: 0;
    left: var(--card-float-l, 0px);
    z-index: 50;
    width: var(--card-float-w, 100%);
}

/* ── Card shell (glass container for nav items) ────────────────────── */

.form-product-card__card {
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    background: rgba(21, 21, 21, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    color: var(--color-sand);
}

/* ── Nav item wrapper (collapse / expand animation) ────────────────── */

.form-product-card__item {
    overflow: hidden;
    transition: max-height 0.25s ease-out,
                opacity 0.25s ease-out;
}

.form-product-card__item:not(.is-active) {
    max-height: 0;
    opacity: 0;
}

/* Fine pointer + real hover: active row ignores clicks (expand via card hover). */
@media (hover: hover) and (pointer: fine) {
    .form-product-card__item.is-active {
        pointer-events: none;
    }

    .form-product-card.is-floating .form-product-card__card:hover .form-product-card__item {
        max-height: 200px;
        opacity: 1;
        cursor: pointer;
        transition-delay: 0.17s;
    }
}

/* Touch / coarse pointer: expand via .is-nav-open (JS); active row must receive taps. */
@media (hover: none), (pointer: coarse) {
    .form-product-card.is-floating .form-product-card__card.is-nav-open .form-product-card__item {
        max-height: 200px;
        opacity: 1;
        cursor: pointer;
        transition-delay: 0.17s;
    }

    .form-product-card__item.is-active {
        pointer-events: auto;
    }
}

.form-product-card__card.is-scrolling .form-product-card__item:not(.is-active) {
    max-height: 0 !important;
    opacity: 0 !important;
}

.form-product-card:not(.is-floating) .form-product-card__card,
.form-product-card.is-docking .form-product-card__card {
    pointer-events: none;
}

.form-product-card:not(.is-floating) .form-product-card__item,
.form-product-card.is-docking .form-product-card__item {
    cursor: default;
}

/* ── Nav item inner (visual: padding + flex row layout) ────────────── */

.form-product-card__item-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px;
    transition: background 0.15s ease-out;
}

@media (hover: hover) and (pointer: fine) {
    .form-product-card__item-inner:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* ── Thumbnail ─────────────────────────────────────────────────────── */

.form-product-card__image {
    flex-shrink: 0;
    width: var(--card-thumb-w);
    border-radius: 8px;
    overflow: hidden;
}

.form-product-card.is-floating .form-product-card__image {
    width: var(--thumb-current, var(--card-mini-thumb));
}

.form-product-card__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Icon-type thumbnails (no product photo) */
.form-product-card__icon-thumb {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-product-card__icon-thumb--placeholder {
    background: #2a2a2a;
    line-height: 0;
}

.form-product-card__icon-thumb--placeholder svg {
    width: 24px;
    height: 24px;
    fill: #fff;
    opacity: 0.9;
}

.form-product-card__icon-thumb--empresa { background: var(--color-dark-sand); }

.form-product-card__icon-thumb--empresa img {
    width: 65%;
    max-width: 65%;
    max-height: 65%;
    height: auto;
    object-fit: contain;
    aspect-ratio: auto;
}

.form-product-card__icon-thumb--biosphera {
    background: url('../../images/thumb-bio-product.jpg') center / cover no-repeat;
}

.form-product-card__icon-thumb--biosphera svg {
    width: 35%;
    height: auto;
    max-height: 75%;
    color: #fff;
}

.form-product-card__icon-thumb--contato { background: var(--color-orange); }

.form-product-card__icon-thumb--contato svg {
    width: 22px;
    height: 22px;
    color: var(--color-sand);
    opacity: 0.7;
}

/* ── Body (company label + title) ─────────────────────────────────── */

.form-product-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.form-product-card__company {
    display: block;
    font-size: 11px;
    opacity: 0.4;
    text-transform: uppercase;
    line-height: 1.3;
}

.form-product-card__title {
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* ── Progress bar (only visible when floating) ─────────────────────── */

.form-product-card__progress {
    display: none;
    padding: 5px 4px 10px;
}

.form-product-card.is-floating .form-product-card__progress {
    display: block;
}

.form-product-card__bar {
    height: 5px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.form-product-card__fill {
    height: 100%;
    width: 0;
    background: var(--color-orange);
    border-radius: 3px;
    will-change: width;
    transition: width 0.05s linear;
}

@media (hover: hover) and (pointer: fine) {
    .form-product-card.is-floating:hover .form-product-card__item.is-active {
        opacity: 0.7 !important;
        background-color: rgba(0, 0, 0, 0.4);
    }
}

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .form-product-card {
        --card-mini-w: 400px;
        --card-thumb-w: 130px;
    }
}

@media (max-width: 768px) {
    .form-product-card {
        --card-mini-w: calc(100vw - 20px);
        --card-thumb-w: 100px;
    }

    .form-product-card__progress {
        padding-bottom: 15px;
    }

    .form-product-card__card {
        border-radius: 10px;
    }

    .form-product-card__item-inner {
        gap: 10px;
    }

    .form-product-card__image { border-radius: 5px; }

    .form-product-card__title {
        font-size: 15px;
    }
}
