/**
 * Rakesh Product Cards Widget — Styles v2.1.0
 */

/* ===== Grid ===== */
.rpc-widget {
    --rpc-cols:        4;
    --rpc-cols-tablet: 2;
    --rpc-cols-mobile: 1;
}

.rpc-grid {
    display: grid;
    grid-template-columns: repeat( var(--rpc-cols), 1fr );
    gap: 18px;
}

@media (max-width: 1024px) {
    .rpc-grid { grid-template-columns: repeat( var(--rpc-cols-tablet), 1fr ); }
}
@media (max-width: 600px) {
    .rpc-grid { grid-template-columns: repeat( var(--rpc-cols-mobile), 1fr ); }
}

/* ===== Single Card ===== */
.rpc-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.rpc-card:hover {
    background: #FBF1DD;
    border-color: #f0d89a;
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
    transform: translateY(-3px);
}

/* ===== Image Area ===== */
.rpc-image-wrap {
    display: block;
    overflow: visible;
    background: #ffffff;
    position: relative;
    padding: 16px 16px 0;
    line-height: 0;
    position: relative;
}

.rpc-image-wrap img {
    width: 100%;
    height: 230px;
    object-fit: contain;   /* show full product, no cropping */
    object-position: center;
    transition: transform 0.4s ease;
    display: block;
    border-radius: 0;
}

.rpc-card:hover .rpc-image-wrap img {
    transform: scale(1.04);
}

/* ===== Floating Icons (right side, appear on hover) ===== */
.rpc-floating-icons {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
    pointer-events: none;
}

.rpc-card:hover .rpc-floating-icons,
.rpc-card:hover .rpc-image-wrap .rpc-floating-icons {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

@media (max-width: 600px) {
    .rpc-floating-icons {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }
}

.rpc-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #555;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.rpc-icon:hover,
.rpc-icon-wishlist.is-active {
    background: #E63946;
    color: #ffffff;
    transform: scale(1.12);
}

.rpc-icon svg {
    display: block;
    pointer-events: none;
}

/* ===== Info Block ===== */
.rpc-info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 5px;
}

/* ===== Rating ===== */
.rpc-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rpc-rating .star-rating {
    font-size: 11px;
    color: #F5A623;
    margin: 0;
    line-height: 1;
}

.rpc-rating .star-rating::before {
    color: #F5A623;
}

.rpc-rating .star-rating span::before {
    color: #F5A623;
}

/* ===== Title ===== */
.rpc-title {
    display: block;
    color: #C0392B;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none !important;
    transition: color 0.2s ease;
    margin-top: 2px;
}

.rpc-title:hover {
    color: #922b21;
}

/* ===== Price ===== */
.rpc-price {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-top: 2px;
}

.rpc-price ins {
    text-decoration: none;
}

.rpc-price del {
    color: #aaa;
    font-size: 12px;
    font-weight: 400;
    margin-right: 4px;
}

/* ===== Add to Cart Row ===== */
.rpc-cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    gap: 8px;
}

/* ===== Add to Cart Button — ALWAYS VISIBLE ===== */
.rpc-add-to-cart {
    display: inline-block;
    background: #E8A020 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 7px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.rpc-add-to-cart:hover {
    background: #c88010 !important;
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none !important;
}

/* ===== No products ===== */
.rpc-no-products {
    color: #888;
    font-style: italic;
}

/* ===== Toast ===== */
.rpc-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #222;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.rpc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
