/**
 * Gallery account screens. Scoped to .fx-gallery-* so it cannot bleed into the
 * rest of the Femmelux account area, and it leans on the same neutral palette
 * the theme's other account sections use.
 */

.fx-gallery-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.fx-gallery-head__hint,
.fx-gallery-composer__hint {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.fx-gallery-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border: 1px solid #111827;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    color: #111827;
}

.fx-gallery-btn--primary {
    background: #111827;
    color: #fff;
}

/* ------------------------------------------------------------- posts list */

.fx-gallery-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fx-gallery-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.fx-gallery-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
}

.fx-gallery-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fx-gallery-card__media .fx-gallery-status {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    max-width: calc(100% - 16px);
}

.fx-gallery-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.55);
    color: #fff;
    font-size: 11px;
    transform: translate(-50%, -50%);
}

.fx-gallery-card__count {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.78);
    color: #fff;
    font-size: 11px;
}

.fx-gallery-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 8px 10px 4px;
}

.fx-gallery-card__caption {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.fx-gallery-card__reason {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #991b1b;
    font-size: 12px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.fx-gallery-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.3;
}

.fx-gallery-card__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding: 0 6px 6px;
}

.fx-gallery-card__actions form {
    margin: 0;
}

.fx-gallery-card__actions a,
.fx-gallery-card__actions button {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 6px;
    border: 0;
    background: none;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

@media (min-width: 640px) {
    .fx-gallery-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (min-width: 760px) and (max-width: 991.98px) {
    .fx-gallery-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .fx-gallery-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }
}

.fx-gallery-card__actions form {
    margin: 0;
}

/* ----------------------------------------------------------------- status */

.fx-gallery-status {
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: #f3f4f6;
    color: #4b5563;
}

.fx-gallery-status--approved {
    background: #ecfdf5;
    color: #047857;
}

.fx-gallery-status--pending,
.fx-gallery-status--processing {
    background: #fffbeb;
    color: #b45309;
}

.fx-gallery-status--rejected {
    background: #fef2f2;
    color: #b91c1c;
}

.fx-gallery-status--hidden {
    background: #f3f4f6;
    color: #374151;
}

/* --------------------------------------------------------------- composer */

.fx-gallery-composer__block {
    padding: 0 0 22px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 22px;
}

.fx-gallery-composer__block h2 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
}

.fx-gallery-composer textarea,
.fx-gallery-composer input[type='search'] {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font: inherit;
    font-size: 13px;
}

.fx-gallery-composer__error {
    margin: 10px 0 0;
    color: #b91c1c;
    font-size: 12px;
}

.fx-gallery-composer__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fx-gallery-composer__actions a {
    color: #6b7280;
    font-size: 13px;
}

/* --------------------------------------------------------------- dropzone */

.fx-gallery-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 24px;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
}

.fx-gallery-dropzone.is-over {
    border-color: #111827;
    background: #f9fafb;
}

.fx-gallery-dropzone.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

.fx-gallery-dropzone button {
    padding: 7px 14px;
    border: 1px solid #111827;
    border-radius: 4px;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
}

/* ----------------------------------------------------------------- thumbs */

.fx-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.fx-gallery-thumb {
    position: relative;
    width: 88px;
    height: 110px;
    border-radius: 4px;
    overflow: hidden;
    cursor: grab;
    background: #f3f4f6;
}

.fx-gallery-thumb.is-dragging {
    opacity: 0.4;
}

.fx-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fx-gallery-thumb__badge {
    position: absolute;
    left: 4px;
    bottom: 4px;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(17, 24, 39, 0.8);
    color: #fff;
    font-size: 10px;
}

.fx-gallery-thumb button[data-gallery-remove] {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.8);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

/* ------------------------------------------------------- product tagging */

.fx-gallery-suggestions {
    margin: 4px 0 0;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
}

.fx-gallery-suggestions li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.fx-gallery-suggestions li:hover {
    background: #f3f4f6;
}

.fx-gallery-suggestions img,
.fx-gallery-tags img {
    width: 34px;
    height: 34px;
    border-radius: 3px;
    object-fit: cover;
    flex: none;
}

.fx-gallery-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.fx-gallery-tags li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
}

.fx-gallery-tags li span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fx-gallery-tags button[data-gallery-untag] {
    border: 0;
    background: none;
    color: #6b7280;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

/* ------------------------------------------------- public feed and single post */

.fx-gallery-feed,
.fx-gallery-single {
    padding: 48px 0 72px;
}

.fx-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.fx-gallery-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.fx-gallery-tile {
    display: block;
    color: inherit;
    text-decoration: none;
}

.fx-gallery-tile__media {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #f3f4f6;
    aspect-ratio: 1;
}

.fx-gallery-tile__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.fx-gallery-tile:hover .fx-gallery-tile__media img {
    transform: scale(1.04);
}

.fx-gallery-tile__flag,
.fx-gallery-tile__count,
.fx-gallery-tile__play {
    position: absolute;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.fx-gallery-tile__flag {
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fx-gallery-tile__count {
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
}

.fx-gallery-tile__play {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    right: 10px;
    bottom: 10px;
    font-size: 13px;
    /* Nudged right of centre to sit inside the triangle glyph's own bearing. */
    padding-left: 2px;
}

.fx-gallery-tile__body {
    padding: 10px 2px 0;
}

.fx-gallery-tile__body p {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.45;
    /* Two lines, so a long caption cannot push tiles out of alignment. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fx-gallery-tile__author {
    color: #6b7280;
    font-size: 12px;
}

.fx-gallery-empty {
    padding: 56px 0;
    color: #6b7280;
    text-align: center;
}

.fx-gallery-pages {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.fx-gallery-single__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.fx-gallery-single__media {
    display: grid;
    gap: 14px;
}

.fx-gallery-single__media img,
.fx-gallery-single__media video {
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #f3f4f6;
}

.fx-gallery-single__author {
    display: grid;
    gap: 2px;
    margin-bottom: 14px;
}

.fx-gallery-single__author time {
    color: #6b7280;
    font-size: 13px;
}

.fx-gallery-single__caption {
    margin: 0 0 22px;
    line-height: 1.6;
    white-space: pre-line;
}

.fx-gallery-single__shop {
    margin: 0 0 12px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fx-gallery-shop {
    display: grid;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.fx-gallery-shop a {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.fx-gallery-shop a:hover {
    border-color: #d1d5db;
}

.fx-gallery-shop img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
}

.fx-gallery-shop span {
    display: grid;
    gap: 2px;
    min-width: 0;
    font-size: 13px;
}

.fx-gallery-shop strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fx-gallery-product-tab .fx-gallery-btn {
    margin-top: 18px;
}

@media (max-width: 991px) {
    .fx-gallery-grid,
    .fx-gallery-grid--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fx-gallery-single__layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/*
 * Composer shell. A phone, including the installed PWA, gets a bottom sheet
 * that stops above the mobile navigation. A wide screen gets a centered modal.
 */

body.fx-gallery-dialog-open {
    overflow: hidden;
}

.fx-gallery-dialog[hidden] {
    display: none !important;
}

.fx-gallery-dialog__backdrop {
    position: fixed;
    inset: 0;
    bottom: var(--flx-nav-h, 0px);
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    z-index: 1090;
}

.fx-gallery-dialog__panel {
    position: fixed;
    z-index: 1091;
    left: 0;
    right: 0;
    bottom: var(--flx-nav-h, 0px);
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - var(--flx-nav-h, 0px) - 24px);
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: fx-gallery-sheet-in 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.fx-gallery-dialog__header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 18px 52px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.fx-gallery-dialog__grabber {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 38px;
    height: 4px;
    border-radius: 4px;
    background: #d4d4d4;
    transform: translateX(-50%);
}

.fx-gallery-dialog__title {
    margin: 0;
    color: #1a1a1a;
    font-size: 17px;
    font-weight: 700;
}

.fx-gallery-dialog__slot {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.fx-gallery-dialog__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #1a1a1a;
    cursor: pointer;
}

.fx-gallery-dialog__close svg {
    width: 18px;
    height: 18px;
}

.fx-gallery-dialog__form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.fx-gallery-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 16px 8px;
    -webkit-overflow-scrolling: touch;
}

.fx-gallery-dialog .fx-gallery-composer__block:last-child {
    margin-bottom: 0;
    padding-bottom: 8px;
    border-bottom: 0;
}

.fx-gallery-dialog .fx-gallery-dropzone {
    flex-wrap: wrap;
}

.fx-gallery-dialog__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.fx-gallery-dialog__footer .fx-gallery-btn--primary {
    flex: 1;
}

@keyframes fx-gallery-sheet-in {
    from {
        transform: translateY(110%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes fx-gallery-modal-in {
    from {
        opacity: 0;
        transform: translate(-50%, -46%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@media (min-width: 992px) {
    .fx-gallery-dialog__backdrop {
        bottom: 0;
    }

    .fx-gallery-dialog__panel {
        top: 50%;
        right: auto;
        bottom: auto;
        left: 50%;
        width: min(560px, calc(100vw - 48px));
        max-height: min(760px, calc(100dvh - 64px));
        border-radius: 16px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
        transform: translate(-50%, -50%);
        animation: fx-gallery-modal-in 0.2s ease;
    }

    .fx-gallery-dialog__grabber {
        display: none;
    }

    .fx-gallery-dialog__header {
        padding-top: 16px;
    }

    .fx-gallery-dialog__body {
        padding: 20px 24px 8px;
    }

    .fx-gallery-dialog__footer {
        padding: 14px 24px;
    }
}

/* ------------------------------------------------------- page-builder slider */

.fx-gslide {
    margin: 28px 0;
}

.fx-gslide__frame {
    position: relative;
}

.fx-gslide__swiper {
    position: relative;
    overflow: hidden;
}

.fx-gslide__swiper:not(.swiper-initialized):not(.swiper-container-initialized) .swiper-wrapper {
    display: flex;
    gap: 16px;
}

.fx-gslide__swiper:not(.swiper-initialized):not(.swiper-container-initialized) .swiper-slide {
    flex: 0 0 calc((100% - 32px) / var(--fx-gslide-cols, 3));
}

.fx-gslide__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
    background: #f3f2f2;
    color: #111;
    text-decoration: none;
}

.fx-gslide__card:hover {
    color: inherit;
    text-decoration: none;
}

.fx-gslide__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #eceae9;
}

.fx-gslide__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fx-gslide__play,
.fx-gmosaic__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    transform: translate(-50%, -50%);
}

.fx-gcard__shade {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    color: #fff;
    pointer-events: none;
}

.fx-gcard__shade::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    height: 160%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.4) 42%, rgba(0, 0, 0, 0) 100%);
}

.fx-gslide__card .fx-gcard__name,
.fx-gslide__card .fx-gcard__caption,
.fx-gslide__card .fx-gcard__count,
.fx-gslide__card .fx-gcard__btn,
.fx-gmosaic__item .fx-gcard__name,
.fx-gmosaic__item .fx-gcard__caption,
.fx-gmosaic__item .fx-gcard__count,
.fx-gmosaic__item .fx-gcard__btn {
    margin: 0;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.fx-gcard__name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.fx-gcard__caption {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.fx-gslide__card .fx-gcard__caption {
    -webkit-line-clamp: 1;
}

.fx-gcard__products {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.fx-gcard__avatars {
    display: flex;
    flex: 0 0 auto;
}

.fx-gcard__avatar {
    width: 36px;
    height: 36px;
    margin-left: -8px;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #fff;
    object-fit: cover;
}

.fx-gcard__avatar:first-child {
    margin-left: 0;
}

.fx-gcard__count,
.fx-gcard__btn {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.fx-gslide__arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 50%;
    background: #fff;
    color: #111;
    box-shadow: 0 8px 20px rgba(17, 17, 17, 0.12);
    cursor: pointer;
    transform: translateY(-50%);
}

.fx-gslide__arrow:hover {
    background: #111;
    color: #fff;
}

.fx-gslide__arrow.swiper-button-disabled {
    opacity: 0;
    pointer-events: none;
}

.fx-gslide__prev { left: 16px; }
.fx-gslide__next { right: 16px; }

.fx-gslide__view {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 18px;
    border: 1px solid #111;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.fx-gslide__view:hover {
    background: #111;
    color: #fff;
}

.fx-gallery-feed-status {
    margin: 0 0 12px;
    color: #6b7280;
    font-size: 14px;
}

.fx-gproduct__head {
    align-items: flex-start;
}

.fx-gproduct__intro {
    flex: 1 1 240px;
    min-width: 0;
}

.fx-gproduct__subtitle {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.45;
}

.fx-gproduct__actions {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.fx-gproduct .fx-gslide__upload,
.fx-gproduct .fx-gslide__view {
    margin-left: 0;
    border-color: var(--primary-color, #010f1c);
    text-decoration: none;
}

.fx-gproduct .fx-gslide__upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 18px;
    border: 1px solid var(--primary-color, #010f1c);
    border-radius: 999px;
    background: var(--primary-color, #010f1c);
    color: var(--tp-common-white, #fff);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.fx-gproduct .fx-gslide__upload:hover,
.fx-gproduct .fx-gslide__upload:focus {
    border-color: var(--tp-common-black, #010f1c);
    background: var(--tp-common-black, #010f1c);
    color: var(--tp-common-white, #fff);
}

.fx-gproduct .fx-gslide__view {
    background: #fff;
    color: var(--primary-color, #010f1c);
}

.fx-gproduct .fx-gslide__view:hover,
.fx-gproduct .fx-gslide__view:focus {
    background: var(--primary-color, #010f1c);
    color: var(--tp-common-white, #fff);
}

.fx-gproduct .fx-gmosaic__button {
    border-color: var(--primary-color, #010f1c);
    color: var(--primary-color, #010f1c);
}

.fx-gproduct .fx-gmosaic__button:hover {
    background: var(--primary-color, #010f1c);
    color: var(--tp-common-white, #fff);
}

.fx-gproduct__more {
    margin-top: 28px;
}

.fx-gproduct .fx-gmosaic-wrap {
    margin: 0;
}

.fx-gproduct .fx-gblock__search {
    flex: 1 1 auto;
    max-width: none;
}

.fx-gproduct__less {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

@media (min-width: 768px) {
    .fx-gslide__arrow { display: inline-flex; }
}

@media (max-width: 767.98px) {
    .fx-gslide__swiper:not(.swiper-initialized):not(.swiper-container-initialized) .swiper-slide {
        flex-basis: 78%;
    }
}

/* -------------------------------------------------------- page-builder grid */

.fx-gmosaic-wrap {
    margin: 28px 0 40px;
}

.fx-gmosaic {
    columns: 2;
    column-gap: 8px;
}

.fx-gmosaic__item {
    position: relative;
    display: block;
    margin: 0 0 8px;
    break-inside: avoid;
    overflow: hidden;
    background: #f3f2f2;
}

.fx-gmosaic__photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--fx-gmosaic-ratio, 3 / 4);
    object-fit: cover;
    transition: transform 0.35s ease;
}

.fx-gmosaic__item:hover .fx-gmosaic__photo {
    transform: scale(1.03);
}

.fx-gmosaic .fx-gcard__name {
    font-size: 13px;
}

.fx-gmosaic .fx-gcard__avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.fx-gmosaic__more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.fx-gmosaic__more p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.fx-gmosaic__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 10px 22px;
    border: 1px solid #111;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.fx-gmosaic__button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.fx-gmosaic__button:hover {
    background: #111;
    color: #fff;
    text-decoration: none;
}

@media (min-width: 768px) {
    .fx-gmosaic { columns: 3; }
}

@media (min-width: 1200px) {
    .fx-gmosaic { columns: var(--fx-gmosaic-cols, 5); }
}

@media (max-width: 575px) {
    .fx-gallery-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .fx-gallery-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fx-gallery-grid,
    .fx-gallery-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* Same photo treatment as the product quick view. */
#product-quick-view-modal.fx-qv-folder .bb-quick-view-gallery-images.fx-gstage {
    overflow: hidden;
    border-radius: 12px;
    background: transparent;
}

#product-quick-view-modal.fx-qv-folder .fx-gstage img,
#product-quick-view-modal.fx-qv-folder .fx-gstage video {
    object-fit: cover;
    background: transparent;
}

#product-quick-view-modal.fx-qv-folder .fx-gstage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.fx-gshop__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.fx-gshop__label {
    margin: 0;
    color: #111;
    font-size: 16px;
    font-weight: 700;
}

.fx-gshop__nav {
    display: flex;
    gap: 8px;
}

.fx-gshop__nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 50%;
    background: #fff;
    color: #111;
    box-shadow: 0 8px 20px rgba(17, 17, 17, 0.12);
    cursor: pointer;
}

.fx-gshop__nav button:hover {
    background: #111;
    color: #fff;
}

.fx-gshop__row {
    display: flex;
    margin-top: 10px;
    overflow: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.fx-gshop__row::-webkit-scrollbar {
    display: none;
}

.fx-gshop__card {
    display: flex;
    flex: 0 0 100%;
    gap: 12px;
    scroll-snap-align: start;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #e6e8ee;
    border-radius: 12px;
    background: #fff;
}

.fx-gshop__card img {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    object-fit: contain;
    background: #f6f7f9;
    border-radius: 8px;
}

.fx-gshop__card strong {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 4px;
    color: #111;
    font-size: 14px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.fx-gshop__price {
    margin-bottom: 8px;
    color: #111;
    font-size: 14px;
    font-weight: 700;
}

.fx-gshop__card .tp-btn {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 13px;
}

.fx-gblock__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.fx-gblock__title {
    margin: 0;
    color: #111;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.fx-gblock__search {
    flex: 1 1 240px;
    max-width: 420px;
    margin: 0;
}

.fx-gblock__search input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 14px;
}

.fx-gblock__search input:focus {
    border-color: #111;
    outline: none;
}

.ck-content a.fx-gblock__upload,
.ck-content a.fx-gblock__upload:hover,
.ck-content a.fx-gblock__upload:focus,
.ck-content a.fx-gblock__upload:active,
.fx-gblock__head a.fx-gblock__upload,
.fx-gblock__head a.fx-gblock__upload:hover,
.fx-gblock__head a.fx-gblock__upload:focus,
.fx-gblock__head a.fx-gblock__upload:active {
    margin-left: auto;
    color: #fff;
    white-space: nowrap;
}

.fx-gblock__empty {
    margin: 0 0 12px;
    color: #6b7280;
}

.fx-gmosaic__item.is-hidden {
    display: none;
}

@media (max-width: 767.98px) {
    .fx-gblock__head {
        flex-wrap: wrap;
    }

    .fx-gslide__view {
        margin-left: 0;
    }

    .fx-gproduct__actions {
        justify-content: flex-start;
        margin-left: 0;
    }

    .fx-gblock__title {
        font-size: 22px;
    }

    .fx-gblock__search,
    .fx-gblock__head a.fx-gblock__upload,
    .fx-gblock__upload {
        flex: 1 1 100%;
        max-width: none;
        margin-left: 0;
    }
}
