/* =====================================================================
   Rabeh shop page (/shop) - Jumia-like product listing
   ===================================================================== */
.o_wsale_products_page, #wrap.js_sale { background: #f5f5f5; }
.oe_website_sale { --jm-accent: #E33B3B; --jm-dark: #1A0C0B; --jm-grey: #75757a; --jm-orange: #f68b1e; }

/* ---------- top bar (search / sort / layout) ---------- */
#products_grid .products_header {
    background: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
    flex-wrap: wrap !important; row-gap: 10px;
}
#products_grid .products_header .oe_search_box { background: #f5f5f5 !important; border-radius: 8px !important; height: 42px; }
#products_grid .products_header .btn-light { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; }

/* ---------- category strip: slides by itself (category_slider.js), no visible scrollbar ---------- */
.o_wsale_filmstip_wrapper { scrollbar-width: none; -ms-overflow-style: none; cursor: grab; scroll-behavior: auto; }
.o_wsale_filmstip_wrapper::-webkit-scrollbar { display: none; }
.o_wsale_filmstip_wrapper.r-cat-dragging { cursor: grabbing; user-select: none; }
.o_wsale_filmstip_wrapper.r-cat-dragging a { pointer-events: none; }
.o_wsale_filmstip_container .r-cat-slider { position: relative; width: 100%; }
.o_wsale_filmstip_container .r-cat-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%;
    border: 0; background: #fff; color: #E33B3B; box-shadow: 0 2px 10px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; }
.o_wsale_filmstip_container .r-cat-arrow:hover { background: #E33B3B; color: #fff; }
.o_wsale_filmstip_container .r-cat-prev { inset-inline-start: -6px; }
.o_wsale_filmstip_container .r-cat-next { inset-inline-end: -6px; }
@media (max-width: 767px) { .o_wsale_filmstip_container .r-cat-arrow { display: none; } }

.o_wsale_filmstip_container { background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.o_wsale_filmstip > li > a, .o_wsale_filmstip > li > div { border-radius: 10px !important; border: 1px solid #eee !important; transition: .2s; }
.o_wsale_filmstip > li > a:hover { border-color: var(--jm-accent) !important; }

/* ---------- grid ---------- */
#o_wsale_products_grid { --gap: 12px; gap: 12px !important; }
#o_wsale_products_grid .oe_product { margin: 0 !important; }
#o_wsale_products_grid .o_wsale_product_grid_wrapper { border: 0 !important; }

/* ---------- product card ---------- */
#o_wsale_products_grid .oe_product_cart {
    flex-direction: column !important; background: #fff; border: 0 !important; border-radius: 8px;
    padding: 10px; position: relative; transition: box-shadow .2s, transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
#o_wsale_products_grid .oe_product_cart:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); transform: translateY(-2px); z-index: 2; }

#o_wsale_products_grid .oe_product_image {
    width: 100% !important; max-width: 100% !important; aspect-ratio: 1 / 1; height: auto !important;
    background: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 0 !important;
}
#o_wsale_products_grid .oe_product_image_link { width: 100%; height: 100%; display: flex !important; align-items: center; justify-content: center; }
#o_wsale_products_grid .oe_product_image img { width: 100% !important; height: 100% !important; object-fit: contain !important; max-height: none !important; }

.r-jm-badge {
    position: absolute; top: 6px; inset-inline-end: 6px; background: #fef3e9; color: var(--jm-orange);
    font-weight: 700; font-size: 13px; border-radius: 4px; padding: 2px 6px; z-index: 3; line-height: 1.4;
}

#o_wsale_products_grid .o_wsale_product_information { padding: 8px 2px 0 !important; text-align: start; gap: 4px; }
#o_wsale_products_grid .o_wsale_products_item_title { font-size: 14px !important; font-weight: 400 !important; line-height: 1.35; margin: 0 0 4px !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
#o_wsale_products_grid .o_wsale_products_item_title a { color: #282828 !important; }
#o_wsale_products_grid .o_wsale_product_sub { flex-direction: column; align-items: flex-start !important; gap: 4px !important; }

.r-jm-price { display: flex; flex-direction: column; gap: 2px; margin: 0 !important; }
.r-jm-now { font-size: 17px; font-weight: 700; color: var(--jm-dark); }
.r-jm-old { font-size: 13px; color: var(--jm-grey); }

.r-jm-rating { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--jm-grey); }
.r-jm-stars { --r: 0; position: relative; display: inline-block; font-size: 13px; line-height: 1; letter-spacing: 1px; }
.r-jm-stars::before { content: "★★★★★"; color: #ddd; }
.r-jm-stars::after { content: "★★★★★"; color: #f6b01e; position: absolute; inset-inline-start: 0; top: 0; width: calc(var(--r) / 5 * 100%); overflow: hidden; white-space: nowrap; }

/* add to cart: shown on hover (desktop), always on touch screens */
.r-jm-add {
    display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 8px;
    background: var(--jm-accent); color: #fff !important; border: 0; border-radius: 6px; padding: 9px 8px;
    font-size: 13px; font-weight: 700; text-transform: uppercase; text-decoration: none !important;
    box-shadow: 0 3px 8px rgba(227,59,59,.25); transition: opacity .2s, background .2s;
}
.r-jm-add:hover { background: #c92f2f; }
.r-jm-add:disabled { opacity: .7; }
.r-jm-add.r-jm-options { background: #fff; color: var(--jm-accent) !important; border: 1px solid var(--jm-accent); box-shadow: none; }
@media (hover: hover) and (min-width: 992px) {
    #o_wsale_products_grid .r-jm-add { opacity: 0; pointer-events: none; }
    #o_wsale_products_grid .oe_product_cart:hover .r-jm-add,
    #o_wsale_products_grid .oe_product_cart:focus-within .r-jm-add { opacity: 1; pointer-events: auto; }
}

/* one heart only (the custom one), placed like Jumia */
#o_wsale_products_grid .o_add_wishlist, #o_wsale_products_grid .o_wsale_product_btn:empty { display: none !important; }
/* z-index: the product image itself has z-index 34 in this theme, so the heart (4) was hidden BEHIND it */
#o_wsale_products_grid .r-shop-wish-btn { position: absolute; top: 16px; left: auto; right: auto; inset-inline-start: 16px; z-index: 40;
    width: 34px; height: 34px; color: #8d8586; font-size: 16px; box-shadow: 0 3px 10px rgba(0,0,0,.16); }
#o_wsale_products_grid .r-shop-wish-btn:hover { color: var(--jm-accent, #E33B3B); }
#o_wsale_products_grid .r-jm-badge { z-index: 36; }
#o_wsale_products_grid .r-jm-gnav { z-index: 38; }
#o_wsale_products_grid .r-jm-dots { z-index: 36; }

/* ---------- filters (offcanvas / sidebar) ---------- */
.oe_website_sale .js_attributes .list-group { max-height: 240px; overflow-y: auto; }
.oe_website_sale .js_attributes .accordion-button { font-weight: 700; }

/* ---------- pager ---------- */
.products_pager .pagination .page-link { border-radius: 50% !important; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; margin: 0 3px; border: 0; color: var(--jm-dark); }
.products_pager .pagination .active .page-link { background: var(--jm-accent); color: #fff; }

/* pricelist dropdown hidden: prices / currency follow the country chosen in the header */
.o_pricelist_dropdown { display: none !important; }

/* toast */
.r-jm-toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; z-index: 2000; background: #282828; color: #fff;
    padding: 12px 20px; border-radius: 8px; transition: .3s; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 14px; }
.r-jm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.r-jm-toast.err { background: #d64545; }
.r-jm-toast a { color: #f6b01e; font-weight: 700; margin-inline-start: 10px; }

@media (max-width: 575px) {
    #o_wsale_products_grid { gap: 8px !important; }
    #o_wsale_products_grid .oe_product_cart { padding: 8px; }
    #o_wsale_products_grid .o_wsale_products_item_title { font-size: 13px !important; }
    .r-jm-now { font-size: 15px; }
    .r-jm-add { font-size: 12px; padding: 8px 6px; }
}

/* ---------- card image slider (products with several images) ---------- */
.r-jm-gallery { position: relative; width: 100%; height: 100%; }
.r-jm-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
    scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.r-jm-track::-webkit-scrollbar { display: none; }
#o_wsale_products_grid .r-jm-track img { flex: 0 0 100%; width: 100% !important; height: 100% !important; object-fit: contain !important; scroll-snap-align: start; }
.r-jm-dots { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.r-jm-dots span { width: 6px; height: 6px; border-radius: 6px; background: rgba(0,0,0,.2); transition: .3s; }
.r-jm-dots span.active { width: 16px; background: var(--jm-accent, #E33B3B); }
.r-jm-gnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 30px; height: 30px; border-radius: 50%; border: 0;
    background: rgba(255,255,255,.95); color: #333; box-shadow: 0 2px 8px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s; font-size: 12px; }
.r-jm-gprev { inset-inline-start: 4px; }
.r-jm-gnext { inset-inline-end: 4px; }
.oe_product_cart:hover .r-jm-gnav { opacity: 1; }
@media (hover: none) { .r-jm-gnav { display: none; } }
