/**
 * RK Related Products Widget - Frontend Styles
 */

/* Grid Container */
.rk-rpw-container {
    width: 100%;
}

.rk-rpw-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Product Card */
.rk-rpw-product {
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Image Container */
.rk-rpw-image {
    position: relative;
    overflow: hidden;
}

.rk-rpw-image a {
    display: block;
}

.rk-rpw-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

/* Sale Badge */
.rk-rpw-sale-badge {
    position: absolute;
    z-index: 10;
    display: inline-block;
    font-weight: 600;
    line-height: 1;
}

.rk-rpw-badge-top-left {
    top: 10px;
    left: 10px;
}

.rk-rpw-badge-top-right {
    top: 10px;
    right: 10px;
}

.rk-rpw-badge-bottom-left {
    bottom: 10px;
    left: 10px;
}

.rk-rpw-badge-bottom-right {
    bottom: 10px;
    right: 10px;
}

/* Content */
.rk-rpw-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Title */
.rk-rpw-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.rk-rpw-title a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.rk-rpw-title a:hover {
    text-decoration: none;
}

/* Rating */
.rk-rpw-rating {
    margin-bottom: 8px;
}

.rk-rpw-rating .star-rating {
    font-size: 14px;
    line-height: 1;
}

/* Price */
.rk-rpw-price {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.rk-rpw-price del {
    opacity: 0.7;
    font-weight: 400;
    margin-right: 5px;
}

.rk-rpw-price ins {
    text-decoration: none;
}

/* Button */
.rk-rpw-button {
    margin-top: auto;
}

.rk-rpw-button a {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.rk-rpw-button a:hover {
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .rk-rpw-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .rk-rpw-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .rk-rpw-title {
        font-size: 14px;
    }
    
    .rk-rpw-price {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .rk-rpw-grid {
        grid-template-columns: 1fr;
    }
}
