Rabatte auf Accessoires und Bekleidung inklusive Damen T-Shirt und Rundhals-Shirt Herren

    --elements-in-row: 3;

    }

    margin-bottom: 10px !important;

    }

    h1 {

    font-size: 18px !important;

    font-weight: 500 !important;

    margin: 0 !important;

    width: 100% !important;

    text-align: center !important;

    }

    .bounce-guard-container {

    display: grid !important;

    justify-content: center !important;

    }

    .bounce-guard-inner-container {

    margin-top: -1em !important;

    width: 100vw !important;

    padding: 15px !important;

    }

    .bounce-guard-page-subtitle {

    font-size: 18px !important;

    font-weight: 300 !important;

    line-height: 1.3 !important;

    text-align: center !important;

    color: #444 !important;

    margin: 0 0 15px 0 !important;

    text-transform: none !important;

    }

    .bounce-guard-products-container {

    display: grid !important;

    gap: 20px !important;

    grid-template-columns: repeat(2, 1fr) !important;

    margin-left: 0 !important;

    margin-right: 0 !important;

    }

    .bounce-guard-product-card {

    display: block !important;

    width: 100% !important;

    border-radius: 4px !important;

    overflow: hidden !important;

    background: #fff !important;

    text-decoration: none !important;

    color: inherit !important;

    border: none !important;

    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05) !important;

    }

    .bounce-guard-card_media-container {

    position: relative !important;

    padding-top: 125% !important;

    overflow: hidden !important;

    }

    .bounce-guard-card_media {

    position: absolute !important;

    top: 0 !important;

    left: 0 !important;

    width: 100% !important;

    height: 100% !important;

    }

    .bounce-guard-card_media img {

    transform: translateZ(0) scale(1);

    width: 100% !important;

    height: 100% !important;

    object-fit: cover !important;

    mix-blend-mode: darken;

    transition: transform 0.3s ease !important;

    border: none !important;

    outline: none !important;

    box-shadow: none !important;

    backface-visibility: hidden !important;

    }

    .bounce-guard-product-card:hover .bounce-guard-card_media img {

    transform: scale(1.05) translateZ(0) !important;

    }

    .bounce-guard-card_content {

    padding: 4px !important;

    }

    .bounce-guard-card_vendor {

    font-size: 12px !important;

    color: #666 !important;

    margin-bottom: 4px !important;

    white-space: nowrap !important;

    overflow: hidden !important;

    text-overflow: ellipsis !important;

    width: 100% !important;

    }

    .bounce-guard-card_title {

    font-size: 14px !important;

    font-weight: 500 !important;

    margin: 0 0 4px !important;

    line-height: 1.3 !important;

    white-space: nowrap !important;

    overflow: hidden !important;

    text-overflow: ellipsis !important;

    width: 100% !important;

    }

    .bounce-guard-card_price-container {

    display: flex !important;

    align-items: center !important;

    gap: 8px !important;

    margin-bottom: 4px !important;

    }

    .bounce-guard-card_price {

    font-weight: 600 !important;

    color: #000 !important;

    }

    .bounce-guard-card_compare-price {

    color: #999 !important;

    text-decoration: line-through !important;

    font-size: 12px !important;

    }

    .bounce-guard-card_tags {

    display: flex !important;

    flex-wrap: wrap !important;

    gap: 4px !important;

    }

    .bounce-guard-card_tag {

    font-size: 11px !important;

    padding: 2px 6px !important;

    background: #f5f5f5 !important;

    border-radius: 12px !important;

    color: #666 !important;

    }

    .bounce-guard-skeleton {

    display: block !important;

    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);

    border-radius: 4px !important;

    background-size: 200% 100%;

    animation: 1.5s skeleton-animation linear infinite;

    }

    .bounce-guard-skeleton::before {

    content: "";

    display: block !important;

    padding-bottom: calc(100% + 100px);

    }

    @keyframes skeleton-animation {

    0% {

    background-position: 200% 0;

    }

    100% {

    background-position: -200% 0;

    }

    }

    /* Responsive Anpassungen basierend auf Bildschirmgrößen, um eine optimale Nutzererfahrung zu gewährleisten */

    @media only screen and (max-width: 575px) {

    }

    @media only screen and (min-width: 576px) {

    }

    @media only screen and (min-width: 768px) {

    .bounce-guard-products-container {

    grid-template-columns: repeat(var(--elements-in-row), 1fr) !important;

    }

    .bounce-guard-card_content {

    padding: 12px !important;

    }

    .bounce-guard-card_title {

    margin: 0 0 8px !important;

    }

    .bounce-guard-card_price-container {

    margin-bottom: 8px !important;

    }

    }

    @media only screen and (min-width: 992px) {

    }

    @media only screen and (min-width: 1200px) {

    h1 {

    font-size: 36px !important;

    }

    .bounce-guard-inner-container {

    max-width: 1260px !important;

    }

    }

    @media only screen and (min-width: 1400px) {

    }

    Preisreduzierung bis zu 15% - nur noch wenige auf Lager!










    constructor(container) {

    this.container = document.querySelector(container);

    this.host = "https://app.beforeyougo.tech";

    }

    async fetchRecommendations() {

    const sessionResponse = await fetch(

    `${this.host}/bounce-guard-api/session?session=${localStorage.getItem("bounce-guard_session")}`,

    );

    if (!sessionResponse.ok) throw new Error("Failed to fetch session data");

    const sessionData = await sessionResponse.json();

    const recommendationsResponse = await fetch(

    `${window.Shopify.routes.root}recommendations/products.json?product_id=${sessionData.product}&limit=9`,

    );

    if (!recommendationsResponse.ok)

    throw new Error("Failed to fetch recommendations");

    const recommendationsData = await recommendationsResponse.json();

    return recommendationsData.products;

    }

    createProductCard(product) {

    const productUrl = new URL(product.url, location.origin);

    const url = encodeURIComponent(

    `${productUrl.origin}${productUrl.pathname}`,

    );

    return `

    ${product.title}

    ${

    product.vendor

    ? `

    ${product.vendor}
    `

    : ""

    }

    ${product.title}

    ${this.formatPrice(

    product.price,

    )}

    ${

    product.compare_at_price

    ? `${this.formatPrice(

    product.compare_at_price,

    )}`

    : ""

    }

    ${

    product.tags?.length

    ? `

    ${product.tags

    .slice(0, 2)

    .map(

    (tag) => `${tag}`,

    )

    .join("")}

    `

    : ""

    }

    `;

    }

    formatPrice(cents) {

    const locale = `${Shopify.locale}-${Shopify.country}`;

    const currency = Shopify.currency.active;

    const formatter = new Intl.NumberFormat(locale, {

    style: "currency",

    currency: currency,

    });

    const dollars = cents / 100;

    return formatter.format(dollars);

    }

    renderProducts(products) {

    const html = products

    .map((product) => this.createProductCard(product))

    .join("");

    this.container.innerHTML = html;

    }

    async init() {

    try {

    const products = await this.fetchRecommendations();

    this.renderProducts(products);

    } catch (error) {

    console.error("Error initializing recommendations:", error);

    }

    }

    }

    // Initialize on load

    document.addEventListener("DOMContentLoaded", () => {

    const recommendations = new BounceGuardRecommendations("#recommendations");

    recommendations.init();

    });

    Diese Gestaltung hebt die Vorteile hochwertiger Produkte wie Damen T-Shirts, Rundhals-Shirts für Herren, Damen Strickmützen und weiterer Modeartikel hervor, die bei buyathome24 erhältlich sind. Durch die klare, moderne Gestaltung werden die Produkte ansprechend präsentiert, was das Einkaufserlebnis verbessert. Die integrierte Empfehlungslösung sorgt