.tfgpd-carousel {
    --tfgpd-gap: 20px;
    --tfgpd-basis: var(--tfgpd-desktop-basis, calc((100% - 100px) / 6));
    box-sizing: border-box;
    color: #222;
    font-family: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 24px 0;
    max-width: 100%;
    position: relative;
}

.tfgpd-carousel *,
.tfgpd-carousel *::before,
.tfgpd-carousel *::after {
    box-sizing: border-box;
}

.tfgpd-heading {
    margin-bottom: 14px;
}

.tfgpd-title {
    color: inherit;
    font: inherit;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.tfgpd-navigation {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.tfgpd-navigation[hidden] {
    display: none;
}

.tfgpd-arrow {
    align-items: center;
    appearance: none;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 28px;
    height: 38px;
    justify-content: center;
    line-height: 1;
    padding: 0 0 3px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    width: 38px;
}

.tfgpd-arrow:not(:disabled):hover,
.tfgpd-arrow:not(:disabled):focus-visible {
    background: var(--tfgpd-accent, #ea4e00);
    border-color: var(--tfgpd-accent, #ea4e00);
    color: #fff;
    outline: none;
}

.tfgpd-arrow:disabled {
    cursor: default;
    opacity: 0.35;
}

.tfgpd-track {
    display: grid;
    gap: var(--tfgpd-gap);
    grid-auto-columns: var(--tfgpd-basis);
    grid-auto-flow: column;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 9px 4px;
    scroll-behavior: smooth;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
}

.tfgpd-track::-webkit-scrollbar {
    display: none;
}

.tfgpd-track:focus-visible {
    border-radius: 10px;
    outline: 2px solid var(--tfgpd-accent, #ea4e00);
    outline-offset: 3px;
}

.tfgpd-product {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(70, 70, 70, 0.08);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    scroll-snap-align: start;
}

.tfgpd-media {
    aspect-ratio: 1 / 1;
    padding: 15px;
    position: relative;
}

.tfgpd-media > a {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
}

.tfgpd-media img {
    display: block;
    height: 100%;
    max-height: 190px;
    max-width: 100%;
    object-fit: contain;
    width: 100%;
}

.tfgpd-image-placeholder {
    background: #f5f5f5;
    border-radius: 8px;
    display: block;
    height: 100%;
    width: 100%;
}

.tfgpd-badge {
    background: var(--tfgpd-accent, #ea4e00);
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    left: 10px;
    line-height: 1;
    padding: 7px 9px;
    position: absolute;
    top: 10px;
    z-index: 1;
}

.tfgpd-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0 15px 15px;
    text-align: center;
}

.tfgpd-manufacturer {
    color: #777;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.tfgpd-product-title {
    color: #222;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 10px;
    min-height: 2.8em;
}

.tfgpd-product-title a {
    color: inherit;
    text-decoration: none;
}

.tfgpd-product-title a:hover,
.tfgpd-product-title a:focus-visible {
    color: var(--tfgpd-accent, #ea4e00);
}

.tfgpd-price {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    justify-content: center;
    margin: auto 0 12px;
    min-height: 24px;
}

.tfgpd-price del {
    color: #777;
    font-size: 12px;
    text-decoration-thickness: 1px;
}

.tfgpd-price ins {
    color: var(--tfgpd-accent, #ea4e00);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.tfgpd-buy-button {
    background: var(--tfgpd-button, #44b121);
    border-radius: 6px;
    color: #fff !important;
    display: block;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    padding: 10px 14px;
    text-align: center;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.tfgpd-buy-button:hover,
.tfgpd-buy-button:focus-visible {
    background: var(--tfgpd-button-hover, #3a971c);
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}

.tfgpd-status {
    background: #f7f7f7;
    border-left: 4px solid #999;
    margin: 20px 0;
    padding: 12px 15px;
}

.tfgpd-error {
    border-left-color: #b32d2e;
}

@media (max-width: 1023px) {
    .tfgpd-carousel {
        --tfgpd-basis: var(--tfgpd-tablet-basis, calc((100% - 40px) / 3));
    }
}

@media (max-width: 767px) {
    .tfgpd-carousel {
        --tfgpd-basis: var(--tfgpd-mobile-basis, calc((100% - 12px) / 2));
        --tfgpd-gap: 12px;
    }

    .tfgpd-product-title {
        font-size: 13px;
    }

    .tfgpd-content {
        padding: 0 10px 10px;
    }

    .tfgpd-media {
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tfgpd-track {
        scroll-behavior: auto;
    }

    .tfgpd-arrow,
    .tfgpd-buy-button {
        transition: none;
    }
}
