/*
* Related Products
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
*  @author    FME Modules
*  @copyright 2025 fmemodules All right reserved
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*/

.related_main_wrapper {
    margin-top: 20px;
}
.related_main_wrapper .related_wrapper_inner .related_products, .home_wrapper .related_wrapper_inner .related_products {
    width: 100%;
}
.related_main_wrapper .related_wrapper_inner, .home_wrapper .related_wrapper_inner {
    background: #fff none repeat scroll 0 0;
    border-bottom: 3px solid #f3f3f3;
    box-sizing: border-box;
    margin-bottom: 20px;
    width: 100%;
}
.related_main_wrapper .related_wrapper_inner .related_products .title, .home_wrapper .related_wrapper_inner .related_products .title {
    height: 30px;
    margin-bottom: 10px;
    position: relative;
}
.ps_new.title {
    padding: 10px;
}
.related_main_wrapper .related_wrapper_inner .related_products .posts_block, .home_wrapper .related_wrapper_inner .related_products .posts_block {
    padding: 20px 0;
    width: 100%;
}
.related_main_wrapper .related_wrapper_inner .related_products .title h2::before, .home_wrapper .related_wrapper_inner .related_products .title h2::before {
    background-color: #009bd3;
    bottom: -2px;
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    width: 36px;
}
.related_main_wrapper .related_wrapper_inner .related_products .title h2, .home_wrapper .related_wrapper_inner .related_products .title h2 {
    border-bottom: 2px solid #f2f2f2;
    color: #2f2f2f;
    font-size: 18px;
    font-weight: 600;
    line-height: 19px;
    margin-bottom: 27px;
    padding-bottom: 13px;
    position: relative;
}
.related_main_wrapper .related_wrapper_inner .related_products .posts_block .item, .home_wrapper .related_wrapper_inner .related_products .posts_block .item {
    margin: 10px;
}
.related_main_wrapper .related_wrapper_inner .related_products .posts_block img, .home_wrapper .related_wrapper_inner .related_products .posts_block img {
    height: auto;
    max-width: 100%;
}
.related_main_wrapper .related_wrapper_inner .related_products .posts_block img:hover {
    border-color: #009bd3;
}
.related_main_wrapper .related_wrapper_inner .related_products .posts_block h3, .home_wrapper .related_wrapper_inner .related_products .posts_block h3 {
    color: #222;
    font-size: 14px;
    font-weight: 400;
    line-height: 23px;
    padding: 8px 0;
    text-align: center;
}
.related_main_wrapper .related_wrapper_inner .related_products .posts_block h3 a, .home_wrapper .related_wrapper_inner .related_products .posts_block h3 a {
    color: #222;
}
.product.related_product_name {
    min-height: 65px;
}
.cart.related_product_name {
    min-height: 85px;
}
.related_product_price {
    float: left;
    font-size: 16px;
    margin-top: 8px;
}
.related_checkbox, .total_price {
    float: right;
}
.rp_image {
    box-sizing: border-box;
    height: 255px;
    margin: 0;
    padding: 0;
    position: relative;
    width: 250px;
    border: 1px solid #f1f1f1;
    text-align: center;
}
.related_checkbox input[type="checkbox"] {
    display: none;
}
.image_overlay.selected::after {
    background: rgba(0, 0, 0, 0.5) none repeat scroll 0 0;
    box-sizing: border-box;
    color: #FFF;
    content: "";
    font-family: "FontAwesome";
    font-size: 60px;
    height: 100%;
    left: 0;
    line-height: 231px;
    position: absolute;
    text-align: center;
    vertical-align: middle;
    width: 100%;
    top: 0;
}

.image_overlay.rp_loader::after {
    background: #fff;
    box-sizing: border-box;
    color: #FFF;
    content: url("../../views/img/loader.gif");
    font-size: 60px;
    height: 100%;
    left: 0;
    line-height: 231px;
    position: absolute;
    text-align: center;
    vertical-align: middle;
    width: 100%;
    top: 0;
    opacity: 0.80;
}

.rp_attribute {
    color: #555;
    font-size: 13px;
}

#relProductsPriceBlock {
    background: #f3f3f3 none repeat scroll 0 0;
    margin-bottom: 5px;
    margin-right: 5px;
    padding: 20px;
}

#relProductsPriceBlock .related_total {
    font-size: 16px;
}

@media (min-width: 200px) and (max-width: 600px) {
    .related_main_wrapper .related_wrapper_inner, .home_wrapper .related_wrapper_inner {
        padding: 0px;
    }

    .rp_image {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        position: relative;
        width: 100%;
        text-align: center;
        border: 1px solid #f1f1f1;
    }

    .ps_new.rp_image {
        height: auto;
        width: auto;
    }

    .cart.ps_new.image_overlay.selected::after {
        line-height: 240px;
    }

    .related_main_wrapper .related_wrapper_inner .related_products .posts_block img, .home_wrapper .related_wrapper_inner .related_products .posts_block img {
        
        height: auto;
    }

    #relProductsPriceBlock {
        float: none;
    }
}

@media (min-width: 200px) and (max-width: 299px) {
    
    .cart.ps_new.related_wrapper_inner .related_products .owl-buttons div.owl-prev, .related_wrapper_inner .related_products .customNavigation a.prev {
        right: -55%!important;
    }
}

@media (min-width: 300px) and (max-width: 600px) {
    .cart.ps_new.related_wrapper_inner .related_products .owl-buttons div.owl-prev, .related_wrapper_inner .related_products .customNavigation a.prev {
        right: -85%!important;
    }
}

@media (min-width: 200px) and (max-width: 398px) {

    .image_overlay.selected::after {
        line-height: 300px;
    }
}

@media (min-width: 399px) and (max-width: 479px) {

    .image_overlay.selected::after {
        line-height: 265px;
    }
    .cart.image_overlay.selected::after {
        line-height: 215px;
    }
}

@media (min-width: 600px) and (max-width: 700px) {

    .image_overlay.selected::after {
        line-height: 290px;
    }
}


@media (min-width: 600px) and (max-width: 767px) {

    .cart.ps_new.image_overlay.selected::after, .product.ps_new.image_overlay.selected::after {
        line-height: 245px;
    }
    .cart.ps_new.rp_image, .product.ps_new.rp_image {
        height: auto;
    }

    .cart.ps_new.related_wrapper_inner .related_products .owl-buttons div.owl-prev, .related_wrapper_inner .related_products .customNavigation a.prev,
    .product.ps_new.related_wrapper_inner .related_products .owl-buttons div.owl-prev, .related_wrapper_inner .related_products .customNavigation a.prev {
        right: -75%!important;
    }
}

@media (min-width: 768px) and (max-width: 980px) {
    .cart.ps_new.rp_image, .product.ps_new.rp_image {
        height: auto;
    }

    .cart.ps_new.image_overlay.selected::after, .product.ps_new.image_overlay.selected::after {
        line-height: 215px;
    }

    .cart.ps_new.related_wrapper_inner .related_products .owl-buttons div.owl-prev, .related_wrapper_inner .related_products .customNavigation a.prev,
    .product.ps_new.related_wrapper_inner .related_products .owl-buttons div.owl-prev, .related_wrapper_inner .related_products .customNavigation a.prev {
        right: -80%!important;
    }
}

@media (min-width: 910px) and (max-width: 979px) {
    .cart.ps_new.rp_image, .product.ps_new.rp_image {
        height: auto;
    }

    .cart.ps_new.image_overlay.selected::after, .product.ps_new.image_overlay.selected::after {
        font-size: 55px;
        line-height: 210px;
    }
}

@media (min-width: 700px) and (max-width: 800px) {
    
    .image_overlay.selected::after {
        line-height: 260px;
    }
}

@media (min-width: 700px) and (max-width: 768px) {

    .cart.image_overlay.selected::after {
        line-height: 286px;
    }
}

@media (min-width: 769px) and (max-width: 800px) {

    .cart.image_overlay.selected::after {
        line-height: 230px;
    }
}

@media (min-width: 600px) {
    .related_main_wrapper .related_wrapper_inner, .home_wrapper .related_wrapper_inner {
        padding: 0px;
    }

    .rp_image {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        position: relative;
        width: 100%;
    }

    .related_main_wrapper .related_wrapper_inner .related_products .posts_block img, .home_wrapper .related_wrapper_inner .related_products .posts_block img {
        height: auto;
    }
}

@media (min-width: 981px) {
    .cart.ps_new.rp_image ,.product.ps_new.rp_image {
        height: auto;
    }

    .cart.ps_new.image_overlay.selected::after,.product.ps_new.image_overlay.selected::after {
        font-size: 45px;
        line-height: 162px;
    }

    .cart.ps_new.related_wrapper_inner .related_products .owl-buttons div.owl-prev, .related_wrapper_inner .related_products .customNavigation a.prev,
    .product.ps_new.related_wrapper_inner .related_products .owl-buttons div.owl-prev, .related_wrapper_inner .related_products .customNavigation a.prev {
        right: -83%!important;
    }
}

@media (min-width: 1000px) {
    .related_wrapper_inner .related_products .owl-buttons div.owl-prev, .related_wrapper_inner .related_products .customNavigation a.prev {
        right: -87% !important;
    }
}


.rp_content { clear:both; }

 .related_main_wrapper {
      border: 1px solid #e0e0e0;
      border-radius: 12px;
      padding: 20px;
      background-color: #fff;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
      margin-bottom: 30px;
    }

    .related_products .title h2 {
      font-size: 24px;
      font-weight: 600;
      color: #333;
      margin-bottom: 20px;
      border-bottom: 2px solid #eee;
      padding-bottom: 10px;
    }

    .item {
      background-color: #fafafa;
      border: 1px solid #ddd;
      border-radius: 10px;
      padding: 15px;
      transition: all 0.3s ease;
      height: 100%;
    }

    .item:hover {
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
      transform: translateY(-4px);
    }

    .rp_image img {
      width: 100%;
      height: auto;
      border-radius: 8px;
      object-fit: cover;
    }

    .rp_content h3 {
      font-size: 16px;
      font-weight: 600;
      margin: 10px 0 5px;
      color: #222;
    }

    .rp_content p {
      font-size: 14px;
      color: #666;
      margin-bottom: 10px;
      min-height: 48px;
    }

    .rp_attribute {
      font-weight: 500;
      font-size: 13px;
      color: #999;
    }

    .related_product_price strong {
      font-size: 16px;
      color: #000;
    }

    .rp_select_button {
      margin-top: 10px;
      font-size: 14px;
      background-color: #24b9d7;
      color: #fff;
      border: none;
      padding: 8px 16px;
      border-radius: 6px;
      transition: background-color 0.3s;
    }

    .rp_select_button:hover {
      background-color: #0056b3;
    }

    .total_price {
      margin-top: 25px;
      text-align: right;
    }

    .related_total strong {
      font-size: 16px;
      color: #333;
    }

    .related_total span {
      font-size: 18px;
      font-weight: bold;
      color: #24b9d7;
    }

    .add_related_products {
      margin-top: 10px;
      padding: 10px 20px;
      border-radius: 6px;
      font-weight: 600;
      font-size: 14px;
    }

    .owl-carousel .item {
      margin: 10px;
    }

    .item {
  width: 250px;
  height: 430px; /* fixed height for all product cards */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.rp_image img {
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

.related_product_name a {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #222;
  height: 45px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related_product_desc {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
  max-height: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* limits to 2 lines */
  -webkit-box-orient: vertical;
}

.bottom_block {
  margin-top: auto;
}

.cart-mode {
    width: auto !important;
}