/* HDS Top Products Widget Styles */
.hds-top-products {
    --columns: 4;
    --card-spacing: 20px;
    padding: 40px 0;
    width: 100%;
}

.hds-top-products__grid {
    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    gap: var(--card-spacing);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.hds-top-products__card {
    text-align: left;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    overflow: hidden;
}

.hds-top-products__image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
    width: var(--image-size, 120px);
}

.hds-top-products__image-wrapper img {
    width: var(--image-size, 120px);
    height: var(--image-size, 120px);
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.hds-top-products__card:hover .hds-top-products__image-wrapper img {
    transform: scale(1.05);
}

.hds-top-products__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.hds-top-products__card:hover .hds-top-products__overlay {
    opacity: 1;
}

.hds-top-products__btn--cart,
.hds-top-products__btn--more {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    cursor: pointer;
    border: none;
}

.hds-top-products__card:hover .hds-top-products__btn--cart,
.hds-top-products__card:hover .hds-top-products__btn--more {
    opacity: 1;
    transform: translateY(0);
}

.hds-top-products__card:hover .hds-top-products__btn--cart:hover,
.hds-top-products__card:hover .hds-top-products__btn--more:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.hds-top-products__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.3;
}

.hds-top-products__price {
    font-size: 15px;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.hds-top-products__info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 5;
}

.hds-top-products__description {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .hds-top-products__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hds-top-products__grid {
        grid-template-columns: 1fr !important;
    }

    .hds-top-products {
        padding: 20px 0;
    }

    .hds-top-products__card {
        flex-direction: column;
        position: relative;
    }

    .hds-top-products__image-wrapper,
    .hds-top-products__image-wrapper img {
        width: 100% !important;
    }

    .hds-top-products__image-wrapper {
        height: auto;
    }

    .hds-top-products__image-wrapper img {
        height: 200px;
    }

    .hds-top-products__overlay {
        position: relative;
        width: 100%;
        height: auto;
        opacity: 1;
        background: transparent !important;
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
        padding: 10px 0;
    }

    .hds-top-products__btn--cart,
    .hds-top-products__btn--more {
        opacity: 1;
        transform: translateY(0);
        padding: 8px 16px;
        font-size: 13px;
    }
}
