/* -----------------------------------------------------
 * 1. Reset WooCommerce Grid Container
 * ----------------------------------------------------- */
.sifency-products-grid-wrapper .woocommerce ul.products {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
}

.sifency-products-grid-wrapper .woocommerce ul.products li.product {
    margin: 0;
    width: auto;
    float: none;
}

/* -----------------------------------------------------
 * 2. Product Card Styling
 * ----------------------------------------------------- */
.sifency-products-grid-wrapper .woocommerce ul.products li.product {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Sale Badge Position Fix */
.sifency-products-grid-wrapper .onsale {
    z-index: 3;
}

/* -----------------------------------------------------
 * 3. Product Image & Sale Badge
 * ----------------------------------------------------- */
.sifency-products-grid-wrapper .product .woocommerce-loop-product__link {
    display: block;
    overflow: hidden;
}

img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail {
    width: 100%;
}

.sifency-products-grid-wrapper .product .woocommerce-loop-product__link img {
    margin: 0 auto;
    transition: transform 0.4s ease;
}

.sifency-products-grid-wrapper .product:hover .woocommerce-loop-product__link img {
    transform: scale(1.05); /* Zoom effect on hover */
}

.sifency-products-grid-wrapper .product span.onsale {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    margin: 0;
    padding: 5px 10px;
    font-size: 0.8em;
    font-weight: 700;
    background-color: #000;
    color: #fff;
}

/* Remove Default WooCommerce Pseudo Elements */
.sifency-products-grid-wrapper ul li::before,
.woocommerce .products ul::after,
.woocommerce .products ul::before,
.woocommerce ul.products::after,
.woocommerce ul.products::before {
    display: none;
}
/* -----------------------------------------------------
 * 4. Product Content Area
 * ----------------------------------------------------- */
.sifency-product-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 15px 20px 20px;
    text-align: left;
}

/* Star Rating */
.sifency-products-grid-wrapper .product .star-rating {
    order: 1;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #FFC107;
}

/* Product Title */
.sifency-products-grid-wrapper .product .woocommerce-loop-product__title {
    order: 2;
    margin: 0 0 5px;
    font-weight: 600;
    color: #222;
}

/* Price */
.sifency-products-grid-wrapper .product .price {
    order: 3;
    margin-top: auto;
    color: #555;
}

.sifency-products-grid-wrapper .product .price ins {
    text-decoration: none;
}

.sifency-products-grid-wrapper .product .price del {
    opacity: 0.5;
}

/* -----------------------------------------------------
 * 5. Add to Cart Button (Reveal on Hover)
 * ----------------------------------------------------- */
.sifency-product-footer {
    padding: 0 20px 20px;
}

.sifency-products-grid-wrapper .product .button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 14px 20px;
    text-align: center;
    font-weight: 600;
    line-height: 1;
    background-color: var(--sifency-addons-themecolor);
    color: #ffffff;

    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.sifency-products-grid-wrapper .product:hover .button {
    opacity: 1;
    transform: translateY(0);
    background: #5634e1;
    color: #fff;
}

/* ===================================================================
 * Sifency Products Widget - Pagination Styles
 * =================================================================== */
.sifency-pagination {
    --pagination-primary-color: #5634e1;
    --pagination-primary-text-color: #ffffff;
    --pagination-default-bg-color: #ffffff;
    --pagination-default-text-color: #495157;
    --pagination-default-border-color: #e2e2e2;
    --pagination-item-size: 40px;
    --pagination-border-radius: 4px;
    --pagination-gap: 8px;
    --pagination-font-size: 14px;
    --pagination-margin-top: 40px;
}

.sifency-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--pagination-gap);
    margin-top: var(--pagination-margin-top);
    padding: 0;
    list-style: none;
}

.sifency-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: var(--pagination-item-size);
    height: var(--pagination-item-size);
    padding: 0 10px;

    font-size: var(--pagination-font-size);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;

    color: var(--pagination-default-text-color);
    background-color: var(--pagination-default-bg-color);
    border: 1px solid var(--pagination-default-border-color);
    border-radius: var(--pagination-border-radius);

    transition: all 0.3s ease-in-out;
}

/* Hover State */
.sifency-pagination a.page-numbers:hover {
    color: var(--pagination-primary-text-color);
    background-color: var(--pagination-primary-color);
    border-color: var(--pagination-primary-color);
    transform: translateY(-2px);
}

/* Active/Current Page */
.sifency-pagination .page-numbers.current {
    color: var(--pagination-primary-text-color);
    background-color: var(--pagination-primary-color);
    border-color: var(--pagination-primary-color);
    cursor: default;
}
.sifency-pagination .page-numbers.dots {
    background-color: transparent;
    border: none;
    cursor: default;
    box-shadow: none;
}
.sifency-pagination .prev,
.sifency-pagination .next {
    font-size: 16px;
}
