/* TLX Product Popup Listing: CSS (1) + features added in CSS (2).
   Existing CSS (1) design values and responsive breakpoints are preserved. */

.tlx-ppl-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.tlx-ppl-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

body.tlx-ppl-modal-open {
    overflow: hidden;
}

.tlx-ppl-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .42);
}

.tlx-ppl-dialog {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    margin: 0;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .24);
    overflow: auto;
    overscroll-behavior: contain;
}

.tlx-ppl-close {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 2;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

.tlx-ppl-close-icon {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.tlx-ppl-close-icon::before,
.tlx-ppl-close-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transform-origin: center;
}

.tlx-ppl-close-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.tlx-ppl-close-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.tlx-ppl-content {
    min-height: 320px;
}

.tlx-ppl-loading,
.tlx-ppl-error {
    padding: 80px 24px;
    text-align: center;
    font-size: 16px;
}

.tlx-ppl-product {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 24px;
    align-items: start;
    padding: 20px;
}

.tlx-ppl-gallery,
.tlx-ppl-info {
    min-width: 0;
}

.tlx-ppl-main-image {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    background: #f8f8f8;
    border-radius: 7px;
}

.tlx-ppl-main-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.tlx-ppl-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-bottom: 3px;
    overflow-x: auto;
}

.tlx-ppl-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.tlx-ppl-thumb.is-active {
    border-color: #111;
}

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

.tlx-ppl-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.12;
    margin: 0px 30px 0px 0px;
}

.tlx-ppl-breadcrumb>.rank-math-breadcrumb>p {
    text-transform: uppercase;
    font-size: 12px;
    margin: 0 30px 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.tlx-ppl-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 5px 0;
    font-size: 20px;
    font-weight: 800;
    color: #ff5c35;
}

.tlx-ppl-price ins,
.tlx-ppl-sale-price {
    order: 1;
    text-decoration: none;
}

.tlx-ppl-price del,
.tlx-ppl-regular-price {
    order: 2;
    color: currentColor;
    font-size: 14px;
    font-weight: 400;
    opacity: .55;
}

.tlx-ppl-sale-bubble {
    order: 3;
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
}

.tlx-ppl-free-price {

    font-weight: 800;
}

.tlx-ppl-description {
    margin: 0 0 10px;
    color: #222;
    font-size: 16px;
    line-height: 1.25;
}

.tlx-ppl-description p {
    margin: 0 0 8px;
}

.tlx-ppl-divider {
    height: 1px;
    margin: 10px 0;
    background: #dcdcdc;
}

.tlx-ppl-details {

    color: #222;
    font-size: 16px;
    line-height: 1.45;
}

.tlx-ppl-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin: 2px 0;
}

.tlx-ppl-detail-row strong {
    color: #757575;
    font-weight: 500;
}

.tlx-ppl-category-row a,
.tlx-ppl-tags-row a {
    color: inherit;
    text-decoration: none;
}

.tlx-ppl-category-row a:hover,
.tlx-ppl-tags-row a:hover {
    text-decoration: underline;
}

/* One-line expand/collapse for popup Categories and Tags.
   Parent min-width:0 is essential in Flatsome flex layouts. */
.tlx-ppl-modal .tlx-ppl-info,
.tlx-ppl-modal .tlx-ppl-details {
    min-width: 0;
    max-width: 100%;
}

.tlx-ppl-modal .tlx-ppl-category-row,
.tlx-ppl-modal .tlx-ppl-tags-row {
    display: flex;
    align-items: baseline;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 4px;
}

.tlx-ppl-modal .tlx-ppl-category-row>strong,
.tlx-ppl-modal .tlx-ppl-tags-row>strong {
    flex: 0 0 auto;
}

.tlx-ppl-modal .tlx-ppl-clamp-control {
    display: flex;
    flex: 1 1 0;
    align-items: baseline;
    gap: 6px;
    width: 0;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    line-height: inherit;
}

.tlx-ppl-modal .tlx-ppl-clamp-text {
    display: block;
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: inherit;
}

.tlx-ppl-modal .tlx-ppl-clamp-control .tlx-ppl-toggle-clamp {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: baseline;
    margin: 0;
    padding: 0;
    min-width: 0;
    min-height: 0;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font: inherit;
    line-height: inherit;
    text-transform: none;
    text-decoration: underline;
    cursor: pointer;
}

.tlx-ppl-modal .tlx-ppl-toggle-clamp[hidden] {
    display: none !important;
}

/* When expanded, wrapping stays inside the right-hand popup column. */
.tlx-ppl-modal .tlx-ppl-clamp-control.is-expanded {
    display: block;
    overflow: visible;
}

.tlx-ppl-modal .tlx-ppl-clamp-control.is-expanded .tlx-ppl-clamp-text {
    display: inline;
    width: auto;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

.tlx-ppl-modal .tlx-ppl-clamp-control.is-expanded .tlx-ppl-toggle-clamp {
    display: inline;
    margin-left: 6px;
}

.tlx-ppl-modal .tlx-ppl-clamp-control .tlx-ppl-toggle-clamp:hover,
.tlx-ppl-modal .tlx-ppl-clamp-control .tlx-ppl-toggle-clamp:focus-visible {
    color: #111;
}

.tlx-ppl-modal .tlx-ppl-clamp-control .tlx-ppl-toggle-clamp:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.tlx-ppl-download-status:not(:empty),
.tlx-ppl-download-fallback:not([hidden]) {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

.tlx-ppl-download-status:not(:empty) {
    color: #9a2626;
}

.tlx-ppl-download-fallback a {
    text-decoration: underline;
}

.tlx-ppl-download-fallback[hidden] {
    display: none !important;
}


.tlx-ppl-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.tlx-ppl-actions .button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 55px;
    margin: 0;
    font-size: 20px;
    line-height: 1.1;
    text-align: center;
    text-transform: none;
    cursor: pointer;
}

.tlx-ppl-free-actions {
    grid-template-columns: 1fr;
}

.tlx-ppl-actions .is-loading,
.tlx-ppl-free-download-button.is-counting,
.tlx-ppl-free-download-button:disabled {
    opacity: .75;
    cursor: wait;
}

.tlx-ppl-product .added_to_cart,
.tlx-ppl-actions .added_to_cart {
    display: none !important;
}

.tlx-ppl-cart-error,
.tlx-ppl-out-of-stock {
    grid-column: 1 / -1;
    display: block;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 14px;
}

.tlx-ppl-cart-error {
    border: 1px solid #e0b4b4;
    background: #fff6f6;
    color: #8a1f1f;
}

.tlx-ppl-out-of-stock {
    background: #f5f5f5;
}

.tlx-ppl-product-card,
.tlx-ppl-product-card .box,
.tlx-ppl-product-card .box-image,
.tlx-ppl-product-card .box-text,
.tlx-ppl-open-link {
    cursor: pointer;
}

.tlx-ppl-loop-free-price {
    font-weight: 800;
    color: #ff5c35;
}

.tlx-ppl-loop-details {
    margin: 8px 0 0;
    color: inherit;
    font-size: 13px;
    line-height: 1.35;
}

.tlx-ppl-loop-detail-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 3px 0;
}

.tlx-ppl-loop-detail-row strong {
    flex: 0 0 auto;
    font-weight: 700;
}

.tlx-ppl-loop-detail-row span {
    min-width: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .tlx-ppl-product {
        grid-template-columns: 1fr 1fr;
        padding: 36px 28px 24px;
    }

    .tlx-ppl-title {
        font-size: 23px;
    }

    .tlx-ppl-actions {
        gap: 12px;
    }
}

@media (max-width: 767px) {
    .tlx-ppl-modal.is-open {
        padding: 11px;
    }

    .tlx-ppl-dialog {
        width: calc(100vw - 22px);
        max-height: calc(100vh - 22px);
        margin: 0;
        border-radius: 6px;
    }

    .tlx-ppl-close {
        top: 12px;
        right: 12px;
    }

    .tlx-ppl-product {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 44px 14px 18px;
    }

    .tlx-ppl-info {
        padding: 0;
    }

    .tlx-ppl-main-image img {
        max-height: 320px;
    }

    .tlx-ppl-title {
        margin-right: 0;
        font-size: 22px;
    }

    .tlx-ppl-price {
        font-size: 20px;
    }

    .tlx-ppl-description,
    .tlx-ppl-details {
        font-size: 15px;
    }

    .tlx-ppl-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tlx-ppl-actions .button {
        min-height: 52px;
        font-size: 17px;
    }
}

/* Accessibility and stable click targets. */
.tlx-ppl-product-card .tlx-ppl-open-link:focus-visible,
.tlx-ppl-modal .tlx-ppl-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    .tlx-ppl-modal *,
    .tlx-ppl-modal *::before,
    .tlx-ppl-modal *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* Internal product identity marker used by Flatsome UX product loops. */
.tlx-ppl-product-marker {
    display: none !important;
}

/* Download guard: blocks the popup and page controls until download is initiated. */
.tlx-ppl-download-guard[hidden] {
    display: none !important;
}

.tlx-ppl-download-guard {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(255, 255, 255, .92);
    text-align: center;
    cursor: progress;
}

.tlx-ppl-download-guard__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    color: #211c19;
    outline: none;
}

.tlx-ppl-download-guard__title {
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.3;
}

.tlx-ppl-download-guard__countdown {
    font-size: clamp(21px, 2.5vw, 30px);
    font-weight: 700;
    line-height: 1.35;
    color: #ea0e0e;
}

.tlx-ppl-download-guard__note {
    font-size: 14px;
    line-height: 1.5;
}

.tlx-ppl-download-guard__cancel {

    margin-top: 4px;
    padding: 8px 18px;
    border: 1px solid #111;
    border-radius: 5px;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.tlx-ppl-download-guard__cancel:hover,
.tlx-ppl-download-guard__cancel:focus-visible {

    background: #111;
    color: #fff;
}

.tlx-ppl-download-guard__cancel:focus-visible {

    outline: 2px solid #111;
    outline-offset: 3px;
}

.tlx-ppl-modal.is-download-locked .tlx-ppl-close {
    opacity: .3;
    cursor: not-allowed;
}


/* Newly introduced popup features from CSS (2). */

/* Card triggers implemented as role="button" without href. */
.tlx-ppl-product-card .box-image a[role="button"],
.tlx-ppl-product-card .product-title a[role="button"] {
    cursor: pointer;
}

/* Preserve the original Rank Math breadcrumb styling; add overflow safety. */
.tlx-ppl-modal .tlx-ppl-breadcrumb {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.tlx-ppl-modal .tlx-ppl-retry-reload {

    display: inline;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font: inherit;
    font-weight: 600;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.tlx-ppl-modal .tlx-ppl-retry-reload:hover,
.tlx-ppl-modal .tlx-ppl-retry-reload:focus-visible {

    background: transparent;
    box-shadow: none;
    color: inherit;
    text-decoration-thickness: 2px;
}

.tlx-ppl-modal .tlx-ppl-retry-reload:focus-visible {

    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Variable product selectors inside popup. */

.tlx-ppl-variations {

    margin: 14px 0 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tlx-ppl-variation-row {

    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tlx-ppl-variation-label {

    font-size: 13px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.tlx-ppl-variation-select {

    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    background: #fff;
    color: #111;
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
}

.tlx-ppl-variation-select:focus-visible {

    outline: 2px solid #111;
    outline-offset: 2px;
}

.tlx-ppl-variation-message:not([hidden]) {

    margin: 2px 0 0;
    padding: 8px 10px;
    border-radius: 5px;
    background: #fff6f6;
    border: 1px solid #e0b4b4;
    color: #8a1f1f;
    font-size: 13px;
    line-height: 1.4;
}

.tlx-ppl-actions .button:disabled {

    opacity: .45;
    cursor: not-allowed;
}

.tlx-ppl-actions .button[hidden] {

    display: none !important;
}