/* ═══════════════════════════════════════════════════════════════════════════
   Recommended Products Widget — Frontend
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Outer wrapper ─────────────────────────────────────────────────────────── */
.rpw-block {
    margin: 0 !important;
    padding: 12px 0 6px !important;
    box-sizing: border-box;
    width: 100%;
}

/* ── Section label / divider ───────────────────────────────────────────────── */
.rpw-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0 2px;
}
.rpw-section-label::before,
.rpw-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #d4c9bb;
}
.rpw-section-label span {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #7a6245 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    line-height: 1;
}

/* ── Carousel viewport (clips the belt) ────────────────────────────────────── */
.rpw-products {
    overflow: hidden !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Sliding belt (flex row, moves left/right via translateX) ───────────────── */
.rpw-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    transition: transform 0.35s cubic-bezier(.4, 0, .2, 1) !important;
    will-change: transform;
}

/* ── Single slide ───────────────────────────────────────────────────────────── */
.rpw-item {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: #f5f0ea !important;
    border-radius: 8px !important;
    padding: 10px !important;
    margin: 0 !important;
    border: none !important;
    min-height: 0 !important;
}
.rpw-item::before,
.rpw-item::after { display: none !important; }

/* ── Product row inside the slide ───────────────────────────────────────────── */
.rpw-item-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
}

/* ── Thumbnail ──────────────────────────────────────────────────────────────── */
.rpw-thumb {
    flex-shrink: 0 !important;
    display: block !important;
    line-height: 0 !important;
    width: 72px !important;
    height: 72px !important;
}
.rpw-thumb img {
    width: 72px !important;
    height: 72px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    display: block !important;
    margin: 0 !important;
}

/* ── Info column ────────────────────────────────────────────────────────────── */
.rpw-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

/* ── Title ──────────────────────────────────────────────────────────────────── */
.rpw-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    max-width: 100%;
}
.rpw-title:hover { color: #7a6245 !important; }

/* ── Price ──────────────────────────────────────────────────────────────────── */
.rpw-price {
    font-size: 12px !important;
    line-height: 1.3 !important;
    color: #333 !important;
}
.rpw-price .screen-reader-text { display: none !important; }
.rpw-price del {
    color: #aaa !important;
    font-size: 11px !important;
    margin-inline-end: 3px;
}
.rpw-price ins {
    text-decoration: none !important;
    font-weight: 700 !important;
    color: #7a6245 !important;
}
.rpw-price .woocommerce-Price-amount { font-size: inherit !important; }

/* ── Variable attribute selects ─────────────────────────────────────────────── */
.rpw-variable-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
}
.rpw-attr-select {
    font-size: 11px !important;
    padding: 3px 5px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    max-width: 105px !important;
    min-width: 60px;
    background: #fff !important;
    cursor: pointer;
    height: auto !important;
    line-height: 1.3 !important;
    color: #333 !important;
    box-shadow: none !important;
}

/* ── Add to cart button ─────────────────────────────────────────────────────── */
.rpw-btn {
    display: block !important;
    width: 100% !important;
    background: #7a6245 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 7px 0 !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    letter-spacing: 0.02em;
    box-shadow: none !important;
    outline: none !important;
    transition: background 0.15s ease;
    text-align: center !important;
    margin-top: 8px !important;
    box-sizing: border-box !important;
}
.rpw-btn:hover,
.rpw-btn:focus  { background: #5e4c34 !important; color: #fff !important; }
.rpw-btn:disabled { opacity: 0.65 !important; cursor: not-allowed !important; }

/* ── Controls row (arrows + dots) ───────────────────────────────────────────── */
.rpw-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 10px 0 2px !important;
}

/* ── Prev / Next arrows ─────────────────────────────────────────────────────── */
.rpw-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #f5f0ea !important;
    border: 1px solid #d4c9bb !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}
.rpw-arrow:hover:not(:disabled) {
    background: #7a6245 !important;
    border-color: #7a6245 !important;
}
.rpw-arrow:hover:not(:disabled) svg { stroke: #fff !important; }
.rpw-arrow:disabled { opacity: 0.3 !important; cursor: not-allowed !important; }
.rpw-arrow svg {
    width: 14px !important;
    height: 14px !important;
    stroke: #7a6245 !important;
    stroke-width: 2.2;
    fill: none !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block !important;
    transition: stroke 0.15s ease !important;
}

/* ── Dots ───────────────────────────────────────────────────────────────────── */
.rpw-dots {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
}
.rpw-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: #d4c9bb !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
    display: block !important;
    flex-shrink: 0 !important;
}
.rpw-dot.rpw-dot-active {
    background: #7a6245 !important;
    transform: scale(1.4) !important;
}

/* ── RTL support ────────────────────────────────────────────────────────────── */
body.rtl .rpw-item-inner       { flex-direction: row-reverse !important; }
body.rtl .rpw-variable-wrapper { flex-direction: row-reverse !important; }
body.rtl .rpw-section-label::before { order: 3; }
body.rtl .rpw-section-label span    { order: 2; }
body.rtl .rpw-section-label::after  { order: 1; }
