/* ============================================================
   Related Products Carousel – rpc-carousel.css  v1.0.4
   ============================================================ */

/* ── Wrapper ──
   NO side padding — full width.
   overflow:visible so arrows (positioned absolute) show outside track. */
.rpc-wrapper {
    width: 100%;
    position: relative;
    box-sizing: border-box;
    /* arrows sit inside this wrapper, so give enough side room */
    padding: 0 44px;
}

/* When Elementor sets the widget to full-width, remove our padding */
.elementor-widget-rpc_related_products .rpc-wrapper {
    padding: 0 44px;
}

/* ── Section Heading ── */
.rpc-section-heading {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

/* ── Carousel Track ── */
.rpc-carousel-track {
    /* slick handles internal layout — no flex here */
}

/* ── Each Slide ── */
.rpc-slide {
    padding: 0 8px;
    box-sizing: border-box;
    outline: none;
}

/* ── Card (<a> tag) ──
   display:block, overflow:hidden to clip image zoom.
   Height comes entirely from rpc-ratio-box inside. */
.rpc-card {
    display: block;
    position: relative;
    text-decoration: none;
    background: #f0f0f0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

/* ── Ratio Box ──
   padding-bottom trick: gives the box its height.
   IMPORTANT: position:relative + overflow:hidden.
   Both image and overlay use position:absolute with inset:0 inside this. */
.rpc-ratio-box {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: block;
    /* padding-bottom set inline, e.g.: style="padding-bottom:133.33%" */
}

/* ── Product Image ──
   Fills ratio-box completely via absolute + inset:0 */
.rpc-img {
    position: absolute;
    inset: 0;               /* top:0 right:0 bottom:0 left:0 */
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;  /* show top of image (face visible) */
    display: block;
    transition: transform 0.45s ease;
}

.rpc-card:hover .rpc-img {
    transform: scale(1.05);
}

/* ── Hover Overlay ──
   Also fills ratio-box via absolute + inset:0.
   Flex centering for title — both axes. */
.rpc-overlay {
    position: absolute;
    inset: 0;               /* top:0 right:0 bottom:0 left:0 */
    width: 100%;
    height: 100%;
    /* Flexbox: perfect center */
    display: flex;
    flex-direction: column;
    justify-content: center;    /* vertical */
    align-items: center;        /* horizontal */
    text-align: center;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    transition: opacity 0.30s ease;
    pointer-events: none;
}

.rpc-card:hover .rpc-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Title position variants */
.rpc-overlay-top    { justify-content: flex-start; padding-top: 20px; }
.rpc-overlay-center { justify-content: center; }
.rpc-overlay-bottom { justify-content: flex-end; padding-bottom: 20px; }

/* ── Hover Title ──
   Plain white text. No background. No box. No border-radius.
   Centered both ways. Slides up on hover. */
.rpc-title {
    display: block;
    width: 100%;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
    padding: 0;
    margin: 0;
    background: transparent;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
    transform: translateY(10px);
    transition: transform 0.30s ease;
}

.rpc-card:hover .rpc-title {
    transform: translateY(0);
}

/* ── Slick Arrows ──
   Circle, white bg + border. Dark fill on hover.
   Positioned outside the track (inside rpc-wrapper padding area). */
.rpc-wrapper .slick-prev,
.rpc-wrapper .slick-next {
    z-index: 20;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 1.5px solid #cccccc;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    transition: background 0.2s ease, border-color 0.2s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.rpc-wrapper .slick-prev { left: 0; }
.rpc-wrapper .slick-next { right: 0; }

.rpc-wrapper .slick-prev:hover,
.rpc-wrapper .slick-next:hover {
    background: #1f1f1f;
    border-color: #1f1f1f;
}

.rpc-wrapper .slick-prev:before,
.rpc-wrapper .slick-next:before {
    font-family: 'slick';
    font-size: 16px;
    line-height: 1;
    color: #333;
    opacity: 1;
    transition: color 0.2s ease;
}

.rpc-wrapper .slick-prev:hover:before,
.rpc-wrapper .slick-next:hover:before {
    color: #ffffff;
}

/* ── Slick Dots ── */
.rpc-wrapper .slick-dots { bottom: -30px; }
.rpc-wrapper .slick-dots li button:before {
    font-size: 10px;
    color: #aaa;
    opacity: 1;
}
.rpc-wrapper .slick-dots li.slick-active button:before { color: #333; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .rpc-wrapper { padding: 0 36px; }
    .rpc-title { font-size: 0.875rem; }
}

@media (max-width: 480px) {
    .rpc-wrapper { padding: 0 30px; }
}
