/* ============================================
   CATEGORY PRODUCTS SLIDER SECTION
   ============================================ */

.category-products-slider-section {
    background: var(--color-white);
    position: relative;
    overflow: hidden;
    padding-bottom: 0;
}

/* Section Header with navigation */
.category-products-slider-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.category-products-slider-section .section-heading {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-900);
    margin: 0;
}

/* Wrapper dla link + buttons */
.section-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.category-products-slider-section .section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family-text);
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-800);
    line-height: 32px;
    border-bottom: 2px solid var(--color-gray-800);
    text-decoration: none;
    transition: all var(--transition-base);
}

.category-products-slider-section .section-link:hover {
    color: var(--color-primary-dark);
    gap: 12px;
}

/* Slider Navigation Buttons */
.slider-navigation {
    display: flex;
    gap: 8px;
}

.slider-nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border: 1px solid var(--color-gray-300);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--color-gray-700);
}

.slider-nav-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.05);
}

.slider-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

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

/* Slider Wrapper */
.products-slider-wrapper {
    overflow: visible; /* ZMIENIONE z 'hidden' */
    margin: 0 calc(var(--container-padding) * -1);
}

/* Products Slider */
.products-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding-bottom: 16px;
    /* DODANE - zapobiega wystawaniu na prawą stronę */
    padding-right: var(--container-padding);
    margin-right: calc(var(--container-padding) * -1);
}

.products-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Product Slide */
.product-slide {
    flex: 0 0 calc((100% - 120px) / 4);
    scroll-snap-align: start;
}

/* Product Card */
.product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-base);
    user-select: none; /* DODANE - zapobiega zaznaczaniu podczas dragu */
}

.product-card:hover {
    transform: translateY(-4px);
}

/* Product Image */
.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 342 / 456; /* 3:4 portrait - 342x456px */
    background: var(--color-gray-100);
    margin-bottom: 16px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    pointer-events: none; /* DODANE - zapobiega draggowaniu obrazków */
}

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

/* Sale Badge */
.sale-badge {
    position: absolute;
    bottom: -82px;
    right: 12px;
    background: #5C2C00;
    color: var(--color-white);
    font-family: var(--font-family-heading);
    font-size: 12px;
    font-weight: var(--font-weight-regular);
    padding: 4px;
    width: 47px;
    border-radius: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Product Info */
.product-info {
    padding: 0 4px;
}

.product-title {
    font-family: var(--font-family-text);
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    color: var(--color-gray-900);
    margin: 0 0 20px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-base);
}

.product-card:hover .product-title {
    color: var(--color-primary);
}

/* Product Price */
.product-price {
    font-family: var(--font-family-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-olive);
}

.product-price .price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.product-price del {
    float: right;
    margin-right: 65px;
}

/* Regular Price (crossed out) - stara cena */
.product-price del,
.product-price del .woocommerce-Price-amount {
    font-size: 14px;
    color: var(--color-gray-500);
    font-weight: var(--font-weight-regular);
    text-decoration: line-through;
}

/* Sale Price (ins) - nowa cena */
.product-price ins,
.product-price ins .woocommerce-Price-amount {
    text-decoration: none;
    color: var(--color-olive);
    font-size: 18px;
    font-weight: 700;
}

/* Zwykła cena (bez del/ins) */
.product-price > .woocommerce-Price-amount {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-family-heading);
    color: var(--color-olive);
}

/* Badge z rabatem (-10%) */
.product-price .onsale {
    font-size: 12px;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: var(--font-weight-semibold);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }

    .section-heading {
        font-size: 24px;
    }

    .slider-navigation {
        position: static;
        margin-top: 16px;
        justify-content: flex-end;
    }

    .product-slide {
        flex: 0 0 240px;
    }

    .product-title {
        font-size: 14px;
    }

    .product-price {
        font-size: 16px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .product-slide {
        flex: 0 0 260px;
    }
}

/* Desktop - show 4 products at once */
@media (min-width: 1200px) {
    .product-slide {
        flex:0 0 calc((100% - 120px) / 4);
        }   
}