/*
* 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 2021 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: 20px;
}
.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 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.8;
}

.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;
  }
} */

/* ========================================
   PRODUCT-MINIATURE INTEGRATION STYLES
   ======================================== */

/* Related Products Carousel Items */
.related_main_wrapper .owl-carousel .item {
  padding: 10px;
}

/* Product Miniature in Related Products */
.related_main_wrapper .product-miniature {
  width: 100%;
  height: 100%;
  margin-bottom: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Thumbnail Container Adjustments */
.related_main_wrapper .thumbnail-container {
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
}

/* Thumbnail Top Section */
.related_main_wrapper .thumbnail-top {
  display: flex;
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.related_main_wrapper .thumbnail-top a {
  display: flex;
  width: 100%;
  height: 100%;
}

.related_main_wrapper .thumbnail-top img {
  width: 100%;
  height: auto;
  object-fit: cover;
  /* max-height: 250px; */
}

.related_main_wrapper .product-description {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Product Title Styling */
.related_main_wrapper .product-title {
  font-family: "Roc Grotesk", sans-serif;
  font-size: 16px;
  font-weight: bold;
  padding-top: 15px;
  padding-bottom: 8px;
  margin: 0;
  line-height: 1.3;
}

.related_main_wrapper .product-title a {
  color: #2f2f2f;
  text-decoration: none;
}

/* Product Reference Styling */
.related_main_wrapper .product-reference {
  font-size: 14px;
  color: #777;
  margin-bottom: 8px;
  display: block;
}

/* Product Price Styling */
.related_main_wrapper .product-price-and-shipping {
  margin-top: auto;
}

.related_main_wrapper .product-price-and-shipping .price {
  padding-top: 10px;
  font-size: 18px;
  font-weight: bold;
  color: #2f2f2f;
  margin: 0;
  font-family: "Roc Grotesk", sans-serif;
}

/* Related Product Attributes */
.related_main_wrapper .rp_attribute {
  color: #555;
  font-size: 12px;
  font-weight: normal;
  display: block;
  margin-top: 5px;
}

/* Remove Default Product Miniature Padding */
.related_main_wrapper .product-miniature {
  padding: 0 !important;
}

/* Ensure proper spacing in carousel */
.related_main_wrapper .owl-carousel .item .product-miniature {
  margin: 0;
  height: 100%;
  min-height: 300px;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

/* Tablet Wide */
@media screen and (max-width: 1024px) {
  .related_main_wrapper .product-title {
    font-size: 15px;
    padding-top: 12px;
    padding-bottom: 6px;
  }

  .related_main_wrapper .product-price-and-shipping .price {
    font-size: 17px;
  }
}

/* Tablet */
@media screen and (max-width: 768px) {
  .related_main_wrapper .product-title {
    font-size: 14px;
    padding-top: 10px;
    padding-bottom: 5px;
  }

  .related_main_wrapper .product-price-and-shipping .price {
    font-size: 16px;
    padding-top: 8px;
  }

  .related_main_wrapper .product-reference {
    font-size: 13px;
  }

  .related_main_wrapper .owl-carousel .item .product-miniature {
    min-height: 280px;
  }
}

/* Mobile */
@media screen and (max-width: 480px) {
  .related_main_wrapper .product-title {
    font-size: 13px;
    padding-top: 8px;
    padding-bottom: 4px;
    line-height: 1.2;
  }

  .related_main_wrapper .product-price-and-shipping .price {
    font-size: 15px;
    padding-top: 6px;
  }

  .related_main_wrapper .product-reference {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .related_main_wrapper .owl-carousel .item {
    padding: 5px;
  }

  .related_main_wrapper .owl-carousel .item .product-miniature {
    min-height: 250px;
  }
}

/* ========================================
   COMPATIBILITY FIXES
   ======================================== */

/* Ensure consistent spacing */
.related_main_wrapper .related_wrapper_inner .related_products .posts_block {
  padding: 20px 0;
}

/* Fix any potential conflicts with existing styles */
.related_main_wrapper .product-miniature .thumbnail-container {
  background: none;
  border: none;
  box-shadow: none;
}

/* Ensure proper image sizing */
.related_main_wrapper .rp_image {
  height: auto !important;
  width: 100% !important;
  border: none !important;
}

.rp_content {
  clear: both;
}

.related_main_wrapper .owl-carousel .item {
  padding: 10px;
}

.related_main_wrapper .product-miniature {
  display: flex;
  width: 100%;
  height: 100%;
  color: #2f2f2f;
  padding: 0;
  text-align: left;
  margin-bottom: 0;
}

.related_main_wrapper .thumbnail-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
  max-width: 280px;
}

.related_main_wrapper .thumbnail-top {
  display: flex;
  width: 100%;
  height: 100%;
}

.related_main_wrapper .thumbnail-top a {
  display: flex;
  width: 100%;
  height: 100%;
}

.related_main_wrapper .thumbnail-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related_main_wrapper .product-description {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.related_main_wrapper .product-title {
  font-family: "Roc Grotesk";
  font-size: 18px;
  font-weight: bold;
  padding-top: 25px;
  padding-bottom: 10px;
}

.related_main_wrapper .product-title a {
  color: #2f2f2f;
  text-decoration: none;
}

.related_main_wrapper .product-reference {
  font-size: 17px;
  line-height: 24px;
}

.related_main_wrapper .product-price-and-shipping .price {
  font-weight: bold;
  color: #2f2f2f;
  margin-right: 4px;
  padding-top: 15px;
  font-size: 24px;
  font-family: "Roc Grotesk";
  margin: 0;
}

.related_main_wrapper .owl-carousel .item .product-miniature {
  margin: 0;
  height: 100%;
  min-height: 350px;
}

/* Tablet Wide */
@media screen and (max-width: 1024px) {
  .related_main_wrapper .product-miniature {
    padding: 5px 15px;
  }

  .related_main_wrapper .product-title {
    font-size: 16px;
    padding-top: 20px;
  }

  .related_main_wrapper .product-price-and-shipping .price {
    font-size: 18px;
    padding-top: 12px;
  }
}

@media screen and (max-width: 768px) {
  .related_main_wrapper .product-miniature {
    padding: 5px 15px;
  }

  .related_main_wrapper .product-title {
    font-size: 15px;
    padding-top: 18px;
  }

  .related_main_wrapper .product-price-and-shipping .price {
    font-size: 17px;
    padding-top: 10px;
  }

  .related_main_wrapper .owl-carousel .item .product-miniature {
    min-height: 320px;
  }
}

@media screen and (max-width: 600px) {
  .related_main_wrapper .thumbnail-container {
    max-width: 100% !important;
  }
}

@media screen and (max-width: 480px) {
  .related_main_wrapper .product-miniature {
    width: 100%;
    padding: 5px 15px 15px 15px;
    justify-content: center;
    border-bottom: 1px solid #777;
  }

  .related_main_wrapper .product-miniature:last-child {
    border-bottom: none;
  }

  .related_main_wrapper .product-title {
    font-size: 14px;
    padding-top: 15px;
    padding-bottom: 8px;
  }

  .related_main_wrapper .product-price-and-shipping .price {
    font-size: 16px;
    padding-top: 8px;
  }

  .related_main_wrapper .owl-carousel .item {
    padding: 5px;
  }

  .related_main_wrapper .owl-carousel .item .product-miniature {
    min-height: 280px;
  }
}

/* ========================================
   COMPATIBILITY & OVERRIDES
   ======================================== */

.related_main_wrapper .rp_image {
  display: none !important;
}

.related_main_wrapper .rp_attribute {
  display: none !important;
}

/* Ensure proper spacing */
.related_main_wrapper .related_wrapper_inner .related_products .posts_block {
  padding: 20px 0;
}
