/* --- Styles für [product_scroll_row] --- */
.gk-product-scroll-row {
    margin-bottom: 2.5em;
    padding: 10px 0;
}

.gk-product-scroll-row:last-child {
    margin-bottom: 0;
}

h2.gk-psr-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    text-align: left;
    border-bottom: 2px solid #2271b1;
    display: inline-block;
    line-height: 1.3;
}

.gk-psr-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 0 15px 0;
    gap: 15px;
    /* Angepasst */
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f5;
    scroll-behavior: smooth;
}

.gk-psr-container::-webkit-scrollbar {
    height: 6px;
}

.gk-psr-container::-webkit-scrollbar-track {
    background: #f0f0f5;
    border-radius: 3px;
}

.gk-psr-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.gk-psr-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.gk-psr-item.product {
    /* Kachel im horizontalen Scroller */
    flex-shrink: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    text-align: left;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.gk-psr-item.product:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.gk-psr-item-link {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gk-psr-item-image {
    position: relative;
    overflow: hidden;
    background-color: #f9f9f9;
}

.gk-psr-item-image img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #f0f0f5;
    border-radius: 4px 4px 0 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0;
    padding: 0;
    transition: transform 0.3s ease;
}

.gk-psr-item.product:hover .gk-psr-item-image img {
    transform: scale(1.05);
}

.gk-psr-item-image .onsale {
    position: absolute;
    top: 8px;
    left: 8px;
    margin: 0;
    padding: .2em .6em;
    font-size: 0.8em;
    line-height: 1.2;
    z-index: 9;
    background-color: #d63638;
    color: #fff;
    border-radius: 3px;
    font-weight: bold;
}

.gk-psr-item-content {
    padding: 8px 10px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gk-psr-item-title {
    font-size: 0.85rem;
    line-height: 1.3;
    font-weight: 500;
    color: #333;
    margin: 0 0 0.3em 0;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gk-psr-item .star-rating {
    font-size: 0.75em;
    margin: 0 0 0.5em 0;
    display: block;
    line-height: 1;
}

.gk-psr-item-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2271b1;
    margin: 0.3em 0 0.5em 0;
}

.gk-psr-item-price del {
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 5px;
    font-weight: normal;
}

.gk-psr-item-button {
    padding: 0 10px 10px 10px;
    margin-top: auto;
}

.gk-psr-item-button .button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.65em 0.8em;
    font-size: 11px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.gk-psr-item-button .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.gk-psr-no-products {
    padding: 10px;
    text-align: center;
    color: #777;
}

/* --- Styles für [product_infinite_feed] --- */
.gk-product-infinite-feed {
    margin-bottom: 2.5em;
    padding: 10px 0;
}

.gk-product-infinite-feed-grid {
    display: grid !important;
    gap: 20px !important;
    padding: 15px 0 !important;
    list-style: none !important;
    margin: 0 !important;
}

@media (max-width: 767px) {

    /* Breitere Boxen auf Handy durch reduzierten Abstand */
    .gk-product-infinite-feed-grid {
        gap: 10px !important;
    }

    .gk-pif-item .gk-psr-item-button {
        padding: 0 4px 8px 4px !important;
    }
}

/* Responsive Grid Columns - RESTORED */
.gk-pif-cols-mobile-1 {
    grid-template-columns: repeat(1, 1fr) !important;
}

.gk-pif-cols-mobile-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.gk-pif-cols-mobile-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.gk-pif-cols-mobile-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

@media (min-width: 768px) {
    .gk-pif-cols-tablet-1 {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .gk-pif-cols-tablet-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .gk-pif-cols-tablet-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .gk-pif-cols-tablet-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .gk-pif-cols-tablet-5 {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .gk-pif-cols-tablet-6 {
        grid-template-columns: repeat(6, 1fr) !important;
    }
}

@media (min-width: 1024px) {
    .gk-pif-cols-desktop-1 {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .gk-pif-cols-desktop-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .gk-pif-cols-desktop-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .gk-pif-cols-desktop-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .gk-pif-cols-desktop-5 {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .gk-pif-cols-desktop-6 {
        grid-template-columns: repeat(6, 1fr) !important;
    }
}

/* Produkt-Karte Infinite Feed */
.gk-pif-item.product {
    background-color: #fff !important;
    border: 2px solid #000 !important;
    border-radius: 12px !important;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important;
    overflow: hidden !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.gk-pif-item.product:hover {
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-5px) !important;
}

/* Link-Wrapper */
.gk-pif-item .gk-psr-item-link {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Bild-Bereich */
.gk-pif-item .gk-psr-item-image {
    position: relative;
    overflow: hidden;
    background-color: #f9f9f9;
    border-bottom: 2px solid #000;
}

.gk-pif-item .gk-psr-item-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0;
    padding: 0;
    transition: transform 0.3s ease;
}

.gk-pif-item.product:hover .gk-psr-item-image img {
    transform: scale(1.05);
}

/* Content Bereich */
.gk-pif-item .gk-psr-item-content {
    padding: 12px 12px 8px 12px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 120px !important;
    /* Puffer für 3 Zeilen + Gruppen-Info unten */
}

/* Titel - Uppercase Sync mit 3D/Poker - STRENG 3 ZEILEN - SICHER */
.gk-pif-item .gk-psr-item-title {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    /* Zurück auf sicheren Wert */
    font-weight: 700 !important;
    color: #000 !important;
    margin: 0 0 10px 0 !important;
    min-height: 3.9em !important;
    /* Sync mit Global (1.3 * 3 = 3.9) */
    height: 3.9em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Preis - Jetzt nach unten geschoben über die Sterne */
.gk-pif-item .gk-psr-item-price {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #000 !important;
    margin-top: auto !important;
    /* Schiebt ALLES darunter nach unten */
    margin-bottom: 3px !important;
}

/* Bewertungen - Direkt unter dem Preis am Boden */
.gk-pif-item .gk-pif-rating-wrap {
    margin-top: 0 !important;
    /* Preis übernimmt das Schieben */
    padding-bottom: 5px !important;
}

.gk-pif-item .star-rating {
    font-size: 0.7em !important;
    margin: 0 !important;
    display: block !important;
    float: none !important;
}

/* Button Container */
.gk-pif-item .gk-psr-item-button {
    padding: 0 12px 15px 12px !important;
    margin-top: 0 !important;
}

.gk-pif-item .gk-psr-item-price del {
    font-size: 0.8em;
    opacity: 0.6;
    font-weight: normal;
    margin-right: 5px;
}

.gk-pif-item .gk-psr-item-price ins {
    text-decoration: none;
}

/* Button Container */
.gk-pif-item .gk-psr-item-button {
    padding: 0 4px 8px 8px !important;
    margin-top: 5px !important;
}

.gk-pif-item .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}


/* Warenkorb-Button Styling für Infinite Feed */
.gk-product-infinite-feed ul.products li.product .button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.65em 0.8em;
    font-size: 11px;
    margin-top: auto;
    box-sizing: border-box;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.gk-product-infinite-feed ul.products li.product .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Container für den Button */
.gk-product-infinite-feed ul.products li.product .button-container {
    padding: 0 10px 10px 10px;
    margin-top: auto;
}

/* Einheitliches Styling für Bewertungen in beiden Funktionen */
.gk-product-scroll-row .star-rating,
.gk-product-infinite-feed .star-rating {
    float: none !important;
    margin: 0.5em 0 !important;
    display: block !important;
}

/* Spezifische Media Query für Mobile */
@media (max-width: 767px) {
    .gk-product-scroll-row .gk-psr-item.product {
        flex-basis: 42vw !important;
        min-width: 40vw !important;
        max-width: 60vw;
        margin: 0;
        /* Kein zusätzlicher Außenabstand */
    }

    .gk-psr-container {
        gap: 4px;
        /* Weniger Abstand zwischen den Boxen */
        padding-left: 2px;
        /* Weniger Abstand links */
        padding-right: 2px;
        /* Weniger Abstand rechts */
    }

    .gk-psr-item-content {
        padding: 6px 6px 0 6px;
        /* Weniger Innenabstand */
    }

}

/* Lade-Animation für Infinite Feed */
.gk-loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}