/*
* 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    FMM Modules
* @copyright Copyright 2025 © FMM Modules
* @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;
}

.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 {
    border-bottom: 1px solid #f2f2f2;
    margin: 10px;
    padding-bottom: 27px;
    padding-top: 15px;
}

.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;
    text-align: left;
}

.related_main_wrapper .related_wrapper_inner .related_products .posts_block h3 a, .home_wrapper .related_wrapper_inner .related_products .posts_block h3 a {
    color: #0092ca;
    font-size: 16px;
    font-weight: bold;
}

.product.related_product_name {
    min-height: 20px;
}

.cart.related_product_name {
    min-height: 85px;
}

.related_product_price {
    font-size: 16px;
    margin-bottom: 8px;
}

.related_checkbox, .total_price {
    float: right;
}

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

.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: 40px;
    height: 100%;
    left: 0;
    line-height: 0;
    position: absolute;
    text-align: center;
    top: 0;
    vertical-align: middle;
    width: 100%;
}

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

#relProductsPriceBlock {
    background: #f3f3f3 none repeat scroll 0 0;
    padding: 20px;
}

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

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

@media (min-width: 200px) and (max-width: 600px) {
    .related_main_wrapper .related_wrapper_inner, .home_wrapper .related_wrapper_inner {
        padding: 0;
    }
    .rp_image {
        border: 1px solid #f1f1f1;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        position: relative;
        text-align: center;
        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;
    }
    #relProductsPriceBlock {
        float: none;
    }
    .rp_content {
        padding-top: 10px;
        clear: both;
    }
}
@media (min-width: 200px) and (max-width: 398px) {
    .image_overlay.selected::after {
        line-height: 240px;
    }
}
@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: 480px) and (max-width: 599px) {
    .image_overlay.selected::after {
        font-size: 50px;
        line-height: 240px;
    }
}

@media (min-width: 600px) and (max-width: 991px) {
    .image_overlay.selected::after {
        line-height: 117px;
    }
}

@media (min-width: 992px) and (max-width: 1199px)  {
    .image_overlay.selected::after {
        line-height: 175px;
    }
}

@media (min-width: 1200px) {
    .image_overlay.selected::after {
        line-height: 130px;
    }
    .cart.ps_new.image_overlay.selected::after{
        line-height: 142px;
    }
    .cart.ps_new.image_overlay.rp_loader::after{
        line-height: 130px;
    }
}

@media (min-width: 600px) {
    .related_main_wrapper .related_wrapper_inner, .home_wrapper .related_wrapper_inner {
        padding: 0;
    }
    .rp_image {
        box-sizing: border-box;
        float: left;
        margin: 0 20px 0 0;
        padding: 0;
        position: relative;
        width: 20%;
    }
    .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: 1000px) {
    .related_wrapper_inner .related_products .owl-buttons div.owl-prev, .related_wrapper_inner .related_products .customNavigation a.prev {
        right: -90% !important;
    }
}
.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;
    }

    .owl-carousel .item {
      display: flex;
      align-items: flex-start;
      border: 1px solid #ddd;
      border-radius: 10px;
      background: #fafafa;
      padding: 15px;
      margin: 10px;
      transition: box-shadow 0.3s ease;
      height: 160px;
    }

    .owl-carousel .item:hover {
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    }

    .rp_image {
      flex: 0 0 120px;
      margin-right: 15px;
    }

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

    .rp_content {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

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

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

    .related_product_desc {
      font-size: 13px;
      color: #555;
      margin-top: 5px;
      max-height: 38px;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }

    .bottom_block {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 10px;
    }

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

    .rp_select_button {
      font-size: 13px;
      background-color: #1d93ab;
      color: #fff;
      border: none;
      padding: 6px 14px;
      border-radius: 6px;
      transition: background-color 0.3s ease;
    }

    .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: #007bff;
    }

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

    @media screen and (max-width: 768px) {
  .owl-carousel .item {
    flex-direction: column;
    height: auto;
    padding: 10px;
  }

  .rp_image {
    flex: 0 0 auto;
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }

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

  .rp_content {
    flex: 1;
  }

  .related_product_name a {
    font-size: 15px;
    white-space: normal;
  }

  .related_product_desc {
    -webkit-line-clamp: 3;
    max-height: 60px;
  }

  .bottom_block {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .related_checkbox button {
    width: 100%;
  }

  .total_price {
    text-align: left;
  }
}
