/* Related Products / Recently Viewed Widget Styles */

.rp-wrapper {
    width: 100%;
}

.rp-section-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
}

/* Grid Layout (Related Products) */
.rp-grid {
    display: grid;
    gap: 20px;
}

.rp-grid .cp-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

.rp-grid .cp-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rp-grid .cp-product-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rp-grid .cp-product-image {
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.rp-grid .cp-product-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 250px;
}

.rp-grid .cp-product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.rp-grid .cp-product-title {
    font-size: 14px;
    font-weight: 400;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.rp-grid .cp-product-title a {
    color: inherit;
    text-decoration: none;
}

.rp-grid .cp-product-title a:hover {
    color: #e67e22;
}

.rp-grid .cp-inquiry-btn {
    background-color: #e67e22;
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    margin-top: auto;
}

.rp-grid .cp-inquiry-btn:hover {
    background-color: #d35400;
}

.rp-no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Swiper Container (Recently Viewed) */
.rp-swiper-container {
    position: relative;
}

.rp-swiper {
    width: 100%;
    overflow: hidden;
}

.rp-swiper-prev,
.rp-swiper-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    transition: color 0.3s;
    user-select: none;
}

.rp-swiper-prev {
    left: -20px;
    transform: translateY(-50%) translateX(-100%);
}

.rp-swiper-next {
    right: -20px;
    transform: translateY(-50%) translateX(100%);
}

.rp-swiper-prev:hover,
.rp-swiper-next:hover {
    color: #e67e22;
}

.rp-swiper-prev svg,
.rp-swiper-next svg {
    stroke: currentColor;
}

.rp-swiper-prev.swiper-button-disabled,
.rp-swiper-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Swiper Slide Equal Height */
.rp-swiper .swiper-wrapper {
    align-items: stretch;
}

.rp-swiper .swiper-slide {
    height: auto;
}

/* Swiper Slide Card */
.rp-swiper .cp-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
    height: 100%;
    box-sizing: border-box;
}

.rp-swiper .cp-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rp-swiper .cp-product-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rp-swiper .cp-product-image {
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.rp-swiper .cp-product-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 200px;
}

.rp-swiper .cp-product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.rp-swiper .cp-product-title {
    font-size: 14px;
    font-weight: 400;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.rp-swiper .cp-product-title a {
    color: inherit;
    text-decoration: none;
}

.rp-swiper .cp-product-title a:hover {
    color: #e67e22;
}

.rp-swiper .cp-inquiry-btn {
    background-color: #e67e22;
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    margin-top: auto;
}

.rp-swiper .cp-inquiry-btn:hover {
    background-color: #d35400;
}

/* View All Collection Card */
.rp-view-all-slide {
    height: auto;
}

.rp-view-all-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    position: relative;
    box-sizing: border-box;
}

.rp-view-all-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(80, 80, 80, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.3s;
}

.rp-view-all-card:hover .rp-view-all-overlay {
    background: rgba(80, 80, 80, 0.75);
}

.rp-view-all-text {
    font-size: 14px;
    color: #fff;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.rp-view-all-subtitle {
    font-size: 20px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Related Swiper Specific */
.rp-related-swiper .swiper-wrapper {
    align-items: stretch;
}

.rp-related-swiper .swiper-slide {
    height: auto;
}

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

@media (max-width: 767px) {
    .rp-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .rp-grid .cp-product-card {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .rp-grid {
        grid-template-columns: 1fr !important;
    }
}
