.wc-styled-upsells-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wc-styled-upsells-title {
    font-size: 1.5rem;
    margin: 0;
}

.wc-styled-upsells-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wc-styled-upsells-prev,
.wc-styled-upsells-next {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.wc-styled-upsells-prev:hover,
.wc-styled-upsells-next:hover {
    transform: scale(1.2);
    color: #3E6F52;
}

.wc-styled-upsells-pagination {
    font-size: 1rem;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

/* Product slides container */
.wc-styled-upsells-products {
    position: relative;
    height: 220px; /* Set fixed height for container to prevent layout shifts */
    overflow: hidden;
}

/* Individual product slides */
.wc-styled-upsells-product {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #f7f7f7;
    border-radius: 1rem;
    border: 1px solid #cfcfccad;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.wc-styled-upsells-product.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.wc-styled-upsells-product.previous {
    transform: translateX(-100%);
    opacity: 0;
    z-index: 1;
}

.wc-styled-upsells-product-inner {
    padding: 5px;
    display: flex;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
}

.wc-styled-upsells-product-inner:hover{
    cursor: pointer;
}

.wc-styled-upsells-rating {
    margin-bottom: 0.5rem;
}

.wc-styled-upsells-rating .star {
    color: #bbb;
}

.wc-styled-upsells-rating .star.filled {
    color: #8cb99b;
}

.wc-styled-upsells-rating .star.half {
    color: #8a8a65;
}

.wc-styled-upsells-product-image {
    width: 20%;
    margin-right: 5%;
    display: flex;
    align-items: center;
}

.wc-styled-upsells-product-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.wc-styled-upsells-product-info {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.wc-styled-upsells-product-title {
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
}

.wc-styled-upsells-product-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wc-styled-upsells-product-title-link:hover {
    color: #3E6F52;
    text-decoration: underline;
}

.wc-styled-upsells-product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #3E6F52;
}

.wc-styled-upsells-add-to-cart {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    color: #000;
    transition: all 0.3s ease;
    z-index: 5;
}

.wc-styled-upsells-add-to-cart:hover {
    background: #3E6F52;
    box-shadow: 0px 0px 10px rgba(62, 111, 82, 0.5);
    color: #fff;
    border: none;
}

/* Make sure the button is fully clickable */
.wc-styled-upsells-add-to-cart:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
}

/* Fix clearfix */
.wc-styled-upsells-product-info:after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive adjustments - Made more like desktop */
@media (max-width: 768px) {
    .wc-styled-upsells-products {
        height: 180px; /* Reduced height for smaller screens */
    }
    
    .wc-styled-upsells-product-inner {
        flex-direction: row; /* Keep as row like desktop */
        padding: 10px;
    }
    
    .wc-styled-upsells-product-image {
        width: 25%; /* Slightly larger than desktop for better visibility */
        margin-right: 4%;
    }
    
    .wc-styled-upsells-product-title {
        font-size: 1.1rem; /* Slightly smaller font */
        margin-bottom: 0.3rem;
    }
    
    .wc-styled-upsells-product-price {
        font-size: 1rem;
    }
    
    .wc-styled-upsells-add-to-cart {
        width: 2.5rem; /* Slightly smaller button */
        height: 2.5rem;
        font-size: 1.2rem;
    }
    
    .wc-styled-upsells-rating {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .wc-styled-upsells-header {
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .wc-styled-upsells-nav {
        align-self: flex-end;
    }
    
    .wc-styled-upsells-products {
        height: 160px;
    }
    
    .wc-styled-upsells-product-inner {
        padding: 8px;
    }
    
    .wc-styled-upsells-product-image {
        width: 30%;
    }
    
    .wc-styled-upsells-product-title {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    .wc-styled-upsells-add-to-cart {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1rem;
    }
}

/* Fix for older Android browsers */
@supports (-webkit-appearance:none) {
    .wc-styled-upsells-product {
        -webkit-transform: translateX(100%);
    }
    
    .wc-styled-upsells-product.active {
        -webkit-transform: translateX(0);
    }
    
    .wc-styled-upsells-product.previous {
        -webkit-transform: translateX(-100%);
    }
}