/*
 * ROBOTIMALL HOMEPAGE DESIGN
 * Version: 1.1 - Product Sections
 * Panda 2.9.2 / PrestaShop 9
 * Scope: Homepage only
 */

body#index {
    --rm-red: #df1422;
    --rm-border: #e6e9ee;
    --rm-text: #161d2b;
    --rm-muted: #727b89;
    --rm-radius: 9px;
    --rm-section-gap: 16px;
}

/* === MAIN PRODUCT SECTIONS === */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) {
    background: #ffffff;
    background-image: none;
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
    box-shadow: none;
    padding: 15px 12px;
    margin-bottom: var(--rm-section-gap);
}

/* === PRODUCT CARDS === */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_outer_box {
    background: #ffffff;
    border: 1px solid #edf0f3;
    border-radius: 7px;
    box-shadow: none;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

/* Prevent old gray hover background */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_outer_box:hover,
body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box:hover {
    background-color: #ffffff;
}

/* Subtle card hover */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_outer_box:hover {
    border-color: #d7dce4;
    box-shadow: 0 2px 9px rgba(20, 30, 50, .045);
}

/* === PRODUCT TYPOGRAPHY === */

body#index .page-home .products_container .s_title_block {
    color: var(--rm-text);
    line-height: 1.75;
}

body#index .page-home .products_container .price {
    font-weight: 700;
}

/* === VIEW ALL LINK === */

body#index .page-home .products_container .product_view_more_box a {
    color: var(--rm-red);
    background: transparent;
    border: none;
    box-shadow: none;
}

body#index .page-home .products_container .product_view_more_box a:hover {
    color: #ab0d19;
}

/* === BRANDS === */

body#index .page-home .brands_slider_container {
    background: #ffffff;
    background-image: none;
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
    padding: 15px 12px;
    margin-bottom: var(--rm-section-gap);
    box-shadow: none;
}

body#index .page-home .brands_slider_item {
    background: #ffffff;
    border: 1px solid #edf0f3;
    border-radius: 6px;
    box-shadow: none;
}

/* === MOBILE === */

@media (max-width: 767px) {
    body#index {
        --rm-section-gap: 12px;
    }

    body#index .page-home :is(
        .stfeaturedslider_container,
        .stbestsellers_container,
        .category_products_container,
        .sthomenew_container,
        .brands_slider_container
    ) {
        padding: 12px 8px;
        border-radius: 7px;
    }
}

/* =====================================================
   ROBOTIMALL HOME V1.2 START
   Product typography and section headers
   ===================================================== */

/* Section headings */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .title_block.flex_container {
    position: relative;
    background: #fff;
    border-bottom: 1px solid #edf0f3;
    padding: 0 4px 12px;
    margin-bottom: 14px;
}

/* Red underline */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .title_block.flex_container::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 34px;
    height: 2px;
    background: #df1422;
    border-radius: 2px;
}

/* Heading typography */

body#index .page-home .products_container
.title_block_inner {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    color: #172033;
}

/* Product card background */

body#index .page-home .products_container
.pro_outer_box {
    background-color: #fff;
}

/* Product information */

body#index .page-home .products_container
.pro_second_box,
body#index .page-home .products_container
.pro_second_box:hover {
    background-color: #fff;
    padding: 10px 8px 8px;
}

/* Product images */

body#index .page-home .products_container
.pro_first_box img.front-image {
    object-fit: contain;
}

/* Product names */

body#index .page-home .products_container
.s_title_block {
    min-height: 3.2em;
    line-height: 1.6;
    margin-bottom: 7px;
}

body#index .page-home .products_container
.s_title_block a {
    color: #202938;
    font-size: 12px;
    line-height: 1.6;
}

body#index .page-home .products_container
.s_title_block a:hover {
    color: #df1422;
}

/* Price layout */

body#index .page-home .products_container
.product-price-and-shipping {
    justify-content: center;
    align-items: center;
    gap: 4px 6px;
    min-height: 30px;
}

body#index .page-home .products_container
.product-price-and-shipping .price {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
    color: #202938;
}

/* Featured product price accent */

body#index .page-home .stfeaturedslider_container
.product-price-and-shipping .price {
    color: #df1422;
}

/* Existing cart and wishlist controls:
   Appearance only; preserve Panda visibility behavior */

body#index .page-home .products_container
.ajax_add_to_cart_button {
    border-radius: 5px;
}

body#index .page-home .products_container
.add_to_love {
    border-radius: 5px;
}

/* Mobile */

@media (max-width: 767px) {
    body#index .page-home .products_container
    .title_block_inner {
        font-size: 14px;
    }

    body#index .page-home .products_container
    .s_title_block a {
        font-size: 11px;
    }

    body#index .page-home .products_container
    .product-price-and-shipping .price {
        font-size: 12px;
    }
}

/* ROBOTIMALL HOME V1.2 END */

/* =====================================================
   ROBOTIMALL HOME V1.3 START
   Persistent Product Actions
   ===================================================== */

/* Show Panda's existing cart controls without hover */

body#index .page-home .products_container
.pro_second_box .act_box_cart.display_when_hover:not(.hide_in_grid) {
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Compact action area */

body#index .page-home .products_container
.pro_second_box .act_box_cart {
    margin-top: 8px;
    text-align: right;
}

/* Existing Add-to-Cart button */

body#index .page-home .products_container
.act_box_cart .ajax_add_to_cart_button:not(.disabled):not([aria-disabled="true"]) {
    background-color: #df1422;
    border: 1px solid #df1422;
    border-radius: 5px;
    color: #ffffff;
    box-shadow: none;
    min-height: 30px;
    transition: background-color .2s ease;
}

body#index .page-home .products_container
.act_box_cart .ajax_add_to_cart_button:not(.disabled):not([aria-disabled="true"]):hover {
    background-color: #bc101b;
    border-color: #bc101b;
    color: #ffffff;
}

/* Disabled controls retain their unavailable state */

body#index .page-home .products_container
.act_box_cart .ajax_add_to_cart_button.disabled,
body#index .page-home .products_container
.act_box_cart .ajax_add_to_cart_button[aria-disabled="true"] {
    opacity: .5;
    cursor: not-allowed;
}

/* Existing inline wishlist control */

body#index .page-home .products_container
.pro_second_box .add_to_love.btn_inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 30px;
    padding: 4px;
    margin: 4px 0 6px 6px;
    border: 1px solid #e6e9ee;
    background: #ffffff;
    border-radius: 5px;
    color: #283246;
    text-decoration: none;
}

body#index .page-home .products_container
.pro_second_box .add_to_love.btn_inline:hover {
    color: #df1422;
    border-color: #df1422;
}

/* Keep the selected wishlist state distinguishable */

body#index .page-home .products_container
.pro_second_box .add_to_love.btn_inline.st_added {
    color: #df1422;
    border-color: #df1422;
}

/* Mobile: do not rely on hover */

@media (max-width: 767px) {
    body#index .page-home .products_container
    .pro_second_box .act_box_cart.display_when_hover:not(.hide_in_grid) {
        display: block;
        visibility: visible;
    }

    body#index .page-home .products_container
    .act_box_cart .ajax_add_to_cart_button {
        min-height: 32px;
    }
}

/* ROBOTIMALL HOME V1.3 END */

/* =====================================================
   ROBOTIMALL HOME V1.4 START
   Section Underlines and Product Actions
   ===================================================== */

/* 1. Remove Panda's original grey heading borders */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container,
    .brands_slider_container
) .title_block.flex_container {
    border-bottom: 0 !important;
    background: transparent;
    padding-bottom: 8px;
}

/* Remove the red line previously added to the container */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container,
    .brands_slider_container
) .title_block.flex_container::after {
    content: none;
}

/* Remove the original Panda title border */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container,
    .brands_slider_container
) .title_block .title_block_inner {
    position: relative;
    border-bottom: 0 !important;
    margin-bottom: 0;
    padding-bottom: 12px;
}

/* The red accent is attached directly to the title */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container,
    .brands_slider_container
) .title_block .title_block_inner::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 34px;
    height: 2px;
    background: #df1422;
    border-radius: 2px;
}

/* 2. Reveal Panda's existing inline actions */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .act_box_inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 3;
    padding: 0;
    margin: 0;
}

/* Position cart alongside existing wishlist */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .act_box_cart {
    margin-top: 8px;
    margin-right: 40px;
    text-align: center;
}

/* Cart button sizing */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .act_box_cart .ajax_add_to_cart_button {
    max-width: 100%;
    min-height: 32px;
    padding: 7px 5px;
    margin-bottom: 6px;
    font-size: 11px;
}

/* Wishlist button */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .add_to_love.btn_inline {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0;
    border: 1px solid #e4e7eb;
    border-radius: 5px;
    background: #ffffff;
    color: #344054;
}

/* Show only the icon, retain the original action */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .add_to_love.btn_inline .btn_text {
    display: none;
}

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .add_to_love.btn_inline:hover,
body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .add_to_love.btn_inline.st_added {
    border-color: #df1422;
    color: #df1422;
}

/* Keep cards responsive */

@media (max-width: 767px) {
    body#index .page-home :is(
        .stfeaturedslider_container,
        .stbestsellers_container,
        .category_products_container,
        .sthomenew_container
    ) .act_box_cart .ajax_add_to_cart_button {
        font-size: 10px;
        padding: 7px 3px;
    }
}

/* ROBOTIMALL HOME V1.4 END */

/* =====================================================
   ROBOTIMALL HOME V1.4.1 START
   Title underline + remove duplicate share icon
   ===================================================== */

/* 1) Full-width red underline directly under the title text */
body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container,
    .brands_slider_container
) .title_block .title_block_inner {
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 0 !important;
}

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container,
    .brands_slider_container
) .title_block .title_block_inner::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #df1422;
    border-radius: 2px;
}

/* 2) Remove the duplicate share icon from the cart/wishlist row */
body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .act_box_inner .social_share_button {
    display: none !important;
}

/* 3) Keep only wishlist in the small side action area */
body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .act_box_inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 3;
    padding: 0;
    margin: 0;
}

/* Keep wishlist compact and clean */
body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .add_to_love.btn_inline {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0;
    border: 1px solid #e4e7eb;
    border-radius: 5px;
    background: #ffffff;
    color: #344054;
}

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .add_to_love.btn_inline .btn_text {
    display: none;
}

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .add_to_love.btn_inline:hover,
body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .add_to_love.btn_inline.st_added {
    border-color: #df1422;
    color: #df1422;
}

/* ROBOTIMALL HOME V1.4.1 END */

/* =====================================================
   ROBOTIMALL HOME V1.4.2 START
   Restore Panda original product hover actions
   ===================================================== */

/*
 * Hide duplicate inline actions under product details.
 * Original image hover actions remain unchanged.
 */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .act_box_inner {
    display: none !important;
}

/*
 * Remove the extra space previously reserved
 * beside the add-to-cart button.
 */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box .act_box_cart {
    display: none !important;
    margin: 0 !important;
}


/* Compact product information after removing cart button */
body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box {
    min-height: 0 !important;
    height: auto !important;
}
/* ROBOTIMALL HOME V1.4.2 END */

/* =====================================================
   ROBOTIMALL HOME V1.4.3 START
   Compact cards and visible bottom border
   ===================================================== */

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_outer_box {
    background: #fff;
    border: 1px solid #e2e6ed;
    border-radius: 10px;
    box-shadow: none;
}

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_second_box {
    min-height: 0 !important;
    height: auto !important;
    padding: 7px 10px 8px !important;
    margin: 0 !important;
    border-radius: 0 0 10px 10px;
}

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .pro_kuan_box {
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
}

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .product-price-and-shipping {
    min-height: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body#index .page-home :is(
    .stfeaturedslider_container,
    .stbestsellers_container,
    .category_products_container,
    .sthomenew_container
) .s_title_block {
    margin-bottom: 4px !important;
}

/* ROBOTIMALL HOME V1.4.3 END */


/* =====================================================
   ROBOTIMALL HOME V1.5 START
   Homepage Category Navigation Cards
   Scope: ST Banner #8 only
   ===================================================== */

/* Category spacing */

body#index .page-home #st_banner_8 {
    margin-top: 8px;
    margin-bottom: 22px;
    row-gap: 12px;
}

body#index .page-home #st_banner_8 .banner_col {
    padding-right: 7px;
    padding-left: 7px;
    padding-top: 5px !important;
}

/* Horizontal navigation card */

body#index .page-home #st_banner_8 a.st_banner_block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    grid-template-rows: 1fr 1fr;
    column-gap: 9px;
    direction: rtl;
    align-items: stretch;
    min-height: 116px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 9px;
    box-shadow: none;
    overflow: hidden;
    text-decoration: none;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

body#index .page-home #st_banner_8 a.st_banner_block:hover {
    border-color: #d2d8e1;
    box-shadow: 0 4px 12px rgba(20,30,50,.06);
    transform: translateY(-2px);
}

/* Image crop: exclude the old caption baked into JPG */

body#index .page-home #st_banner_8 a.st_banner_block picture {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: block;
    width: 96px;
    height: 78px;
    max-width: 100%;
    align-self: center;
    justify-self: center;
    overflow: hidden;
}

body#index .page-home #st_banner_8 a.st_banner_block
picture img {
    display: block;
    width: 96px;
    max-width: 100%;
    margin: 0 auto;
}

/* Text elements generated from known category labels */

body#index .page-home #st_banner_8 a.st_banner_block::before {
    grid-column: 1;
    grid-row: 1;
    display: block;
    align-self: end;
    min-width: 0;
    margin-bottom: 3px;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    text-align: right;
    white-space: normal;
}

body#index .page-home #st_banner_8 a.st_banner_block::after {
    grid-column: 1;
    grid-row: 2;
    display: block;
    align-self: start;
    min-width: 0;
    color: #747d8b;
    font-size: 10px;
    line-height: 1.7;
    text-align: right;
    white-space: normal;
}

/* Electronics */

body#index .page-home #st_banner_block_5::before {
    content: "قطعات الکترونیکی";
}

body#index .page-home #st_banner_block_5::after {
    content: "بردها، سنسورها و ماژول‌ها";
}

/* Mechanical */

body#index .page-home #st_banner_block_6::before {
    content: "قطعات مکانیکی";
}

body#index .page-home #st_banner_block_6::after {
    content: "موتورها، گیربکس‌ها و اتصالات";
}

/* Robotics */

body#index .page-home #st_banner_block_7::before {
    content: "ربات‌ها و اتوماسیون‌ها";
}

body#index .page-home #st_banner_block_7::after {
    content: "انواع ربات و تجهیزات کنترلی";
}

/* Books and software */

body#index .page-home #st_banner_block_8::before {
    content: "کتاب و نرم‌افزارها";
}

body#index .page-home #st_banner_block_8::after {
    content: "منابع آموزشی و نرم‌افزارهای تخصصی";
}

/* Tablet */

@media (min-width: 576px) and (max-width: 991px) {
    body#index .page-home #st_banner_8 a.st_banner_block {
        min-height: 112px;
    }
}

/* Small mobile screens */

@media (max-width: 575px) {
    body#index .page-home #st_banner_8 .banner_col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    body#index .page-home #st_banner_8 a.st_banner_block {
        min-height: 98px;
        padding: 10px 12px;
        grid-template-columns: minmax(0, 1fr) 85px;
    }

    body#index .page-home #st_banner_8 a.st_banner_block picture {
        width: 85px;
        height: 72px;
    }

    body#index .page-home #st_banner_8 a.st_banner_block picture img {
        width: 85px;
    }
}

/* ROBOTIMALL HOME V1.5 END */

/* ROBOTIMALL HOME V1.5.1 START */

/*
 * Restore Panda's original 10px banner gutters.
 * Prevent clipping of the first and last card borders.
 */

body#index .page-home #st_banner_8 .banner_col {
    padding-right: 10px;
    padding-left: 10px;
}

/* ROBOTIMALL HOME V1.5.1 END */




/* ROBOTIMALL MOBILE OWL RTL FIX START */
@media (max-width: 767px) {
  #st_owl_carousel-2,
  #st_owl_carousel-2 .owl-wrapper {
    direction: ltr !important;
  }

  #st_owl_carousel-2 .owl-item {
    float: left !important;
  }
}
/* ROBOTIMALL MOBILE OWL RTL FIX END */

/* ROB‌OTIMALL MOBILE ARROW FIX */
@media (max-width: 767px) {
  #st_owl_carousel-2 .owl-prev i,
  #st_owl_carousel-2 .owl-next i {
    display: inline-block;
    transform: rotate(180deg);
  }
}

/* =====================================================
   ROBOTIMALL STOCK STATUS V1 START
   Display unavailable status instead of product price
   Homepage product sliders only
   ===================================================== */

body#index .page-home article.js-product-miniature:has(.st_sticker_4)
.product-price-and-shipping {
    display: none !important;
}

body#index .page-home article.js-product-miniature:has(.st_sticker_4)
.st_sticker_block {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    margin: 0 !important;
    padding: 0 !important;
}

body#index .page-home article.js-product-miniature:has(.st_sticker_4)
.st_sticker_4 {
    display: block !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body#index .page-home article.js-product-miniature:has(.st_sticker_4)
.st_sticker_text {
    color: #777 !important;
    font-size: 13px;
    font-weight: 500;
}

/* ROBOTIMALL STOCK STATUS V1 END */
