/**
 * RW Finch Widgets - Main Stylesheet
 *
 * @package RW_Finch_Widgets
 */

/* ==========================================================================
   Related Products Carousel Widget
   ========================================================================== */

/* Ensure the Swiper container spans full width minus the arrows */
.elementor-swiper {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

/* Swiper slides */
.swiper-slide {
    text-align: center;
    padding: 10px;
}

.swiper-slide img {
    width: 100%;
    max-width: 100px;
    height: auto;
    margin-bottom: 10px;
}

/* Prev/Next arrows */
.swiper-button-prev,
.swiper-button-next {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    width: 30px;
}

/* Default styles for arrows */
.swiper-button-prev {
    left: -40px;
}

.swiper-button-next {
    right: -40px;
}

/* Pagination bullets */
.swiper-pagination {
    position: relative !important;
}

.swiper-pagination-bullets.swiper-pagination-horizontal {
    bottom: 0 !important;
    width: auto !important;
}

/* ==========================================================================
   Product Variation Details Widget
   ========================================================================== */

.rw-product-variation-details {
    width: 100%;
}

.rw-variation-table {
    width: 100%;
    border-collapse: collapse;
    border-style: solid;
}

.rw-variation-table th,
.rw-variation-table td {
    border-style: solid;
    text-align: left;
}

.rw-variation-table thead th {
    font-weight: 600;
}

/**
 * Product Variation Table Background Override
 * 
 * This rule removes alternating row background colors (zebra striping) from
 * product variation tables by setting the background-color to 'inherit'.
 * 
 * It targets both odd and even rows within the table body, affecting both
 * <td> (data cells) and <th> (header cells) elements.
 * 
 * Scope: Tables with class 'rw-variation-table' that are descendants of
 *        elements with class 'rw-product-variation-details'
 * 
 * Purpose: Overrides default WordPress theme table styling to allow the
 *          variation table to inherit background colors from parent elements
 *          rather than using the theme's default alternating row colors.
 */
/* Override theme table styles */
.rw-product-variation-details table.rw-variation-table tbody > tr:nth-child(odd) > td,
.rw-product-variation-details table.rw-variation-table tbody > tr:nth-child(odd) > th,
.rw-product-variation-details table.rw-variation-table tbody > tr:nth-child(even) > td,
.rw-product-variation-details table.rw-variation-table tbody > tr:nth-child(even) > th {
    background-color: inherit;
}
