/* Products Swiper Block Styles */

.products-swiper-container {
    width: 100%;
    position: relative;
    margin-bottom: 3rem; /* Space for pagination */
}

.products-swiper {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
}

.products-swiper .swiper-wrapper {
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
    align-items: stretch; 
}

.products-swiper .swiper-slide {
    height: auto;
    display: flex;
    align-items: flex-start;
    padding: 0 10px;
}

.products-swiper .swiper-slide .product-item {
    width: 100%;
    height: 100%; 
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Product card styles from template-parts/product-card.php */
.products-swiper .product-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.products-swiper .product-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.products-swiper .product-title {
    font-size: 2.4rem;
    font-weight: 300;
    font-family: var(--redhat-display);
    color: var(--color-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.2;
}


.products-swiper .product-image-container {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
    margin-bottom: 1.5rem;
}


.products-swiper .product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.products-swiper .product-item:hover .product-title {
    opacity: 0;
}

.products-swiper .product-item:hover .product-thumbnail {
    transform: scale(1.05);
}

.products-swiper .product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 40, 86, 0.9);
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    opacity: .3;
    margin-top: auto;
    border-radius: 8px;
    z-index: 1;
}

.products-swiper .product-image-container:hover .product-overlay {
    opacity: 1;
}

.products-swiper .overlay-intro {
    font-size: 1.6rem;
    line-height: 1.4;
    margin-bottom: 2rem;
    font-family: var(--redhat-display);
}

.products-swiper .overlay-item {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.products-swiper .overlay-item-title {
    font-weight: 600;
    font-size: 1.4rem;
    font-family: var(--redhat-display);
}

.products-swiper .overlay-item-description {
    font-size: 1.4rem;
    line-height: 1.3;
    font-family: var(--redhat-display);
}

.products-swiper .overlay-cta {
    margin-top: auto;
    padding: 1.2rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    font-size: 1.4rem;
    font-family: var(--redhat-display);
    transition: background 0.3s ease;
}

.products-swiper .overlay-cta:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Swiper pagination */
.products-swiper .swiper-pagination {
    position: relative;
    text-align: center;
    width: 100%;
    margin-top: 2rem;
    z-index: 10;
}

.products-swiper .swiper-pagination-bullet {
    background: var(--accent-gray-subtle);
    opacity: 0.5;
    transition: all 0.3s ease;
    margin: 0 6px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    width: 12px;
    height: 12px;
}

.products-swiper .swiper-pagination-bullet-active {
    background: var(--color-secondary);
    opacity: 1;
    transform: scale(1.2);
}

/* Ensure proper spacing and layout */
.products-swiper .swiper-slide:first-child {
    padding-left: 0;
}

.products-swiper .swiper-slide:last-child {
    padding-right: 0;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .products-swiper .swiper-slide {
        padding: 0 5px;
    }
    
    .products-swiper .swiper-slide .product-item {
        padding: 1rem;
    }
    
    .products-swiper .product-title {
        font-size: 1.8rem;
    }
    
    .products-swiper .product-image-container {
        height: fit-content;
        margin-bottom: 1rem;
    }
    
    .products-swiper .overlay-intro {
        font-size: 1.4rem;
    }
    
    .products-swiper .overlay-item-title,
    .products-swiper .overlay-item-description {
        font-size: 1.2rem;
    }

    .products-swiper .swiper-pagination{
        margin-top: 4rem;
    }
    
    .products-swiper .overlay-cta {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
    }
}
