/* Global Product Groups - Frontend Styles */

.gpg-product-group {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
}

.gpg-group-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #333;
}

/* Wrapper slidera */
.gpg-products-wrapper {
    position: relative;
    padding: 0 50px;
}

/* Przyciski nawigacji */
.gpg-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
}

.gpg-nav:hover {
    background: #f5f5f5;
    border-color: #999;
}

.gpg-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gpg-nav-prev {
    left: 0;
}

.gpg-nav-next {
    right: 0;
}

.gpg-nav svg {
    width: 24px;
    height: 24px;
}

/* Slider */
.gpg-products-slider {
    overflow: hidden;
    position: relative;
}

.gpg-products-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

/* Produkt */
.gpg-product-item {
    flex: 0 0 calc(25% - 15px);
    min-width: 0;
}

.gpg-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.gpg-product-link:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #ccc;
    transform: translateY(-2px);
}

.gpg-product-image {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.gpg-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gpg-product-link:hover .gpg-product-image img {
    transform: scale(1.05);
}

.gpg-product-info {
    padding: 15px;
    text-align: center;
}

.gpg-product-name {
    font-size: 14px;

    margin: 0 0 8px 0;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Responsive */
@media (max-width: 1024px) {
    .gpg-product-item {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .gpg-products-wrapper {
        padding: 0 40px;
    }
    
    .gpg-product-item {
        flex: 0 0 calc(50% - 10px);
    }
    
    .gpg-nav {
        width: 36px;
        height: 36px;
    }
    
    .gpg-nav svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .gpg-product-group {
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .gpg-group-title {
        font-size: 18px;
        margin-bottom: 15px;
        padding: 0 15px;
    }
    
    .gpg-products-wrapper {
        padding: 0 50px;
    }
    
    .gpg-products-slider {
        overflow: hidden;
        width: 100%;
    }
    
    .gpg-product-item {
        flex: 0 0 70%;
        min-width: 70%;
        max-width: 70%;
    }
    
    .gpg-products-track {
        gap: 20px;
    }
    
    .gpg-product-link {
        border-radius: 6px;
    }
    
    .gpg-product-info {
        padding: 10px;
    }
    
    .gpg-nav {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    
    .gpg-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .gpg-nav-prev {
        left: 5px;
    }
    
    .gpg-nav-next {
        right: 5px;
    }
}

/* Loading state */
.gpg-product-group.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty state */
.gpg-empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}
