/*
Theme Name: bbm-flatsome
Version: 1.0
Description: A child theme of Flatsome
Template: flatsome
Author: Administrator
*/
@import url("../flatsome/style.css");

/* Your awesome customization starts here */
#home-page-text {
    max-width: 950px !important;
    margin: 0 auto;
}

/*categories images Fix : I hope */
/* For ux_banner or category header images - prevent cover cropping */
.ux-banner img,
.banner img,
.category-header img {
    object-fit: contain !important;
    /* or 'none' for original size */
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
}

/* For subcategory/product category thumbnails */
.woocommerce ul.products li.product-category img,
.product-category img,
.attachment-woocommerce_thumbnail {
    object-fit: contain !important;
    height: auto !important;
    width: 100% !important;
}

/* If the container has fixed height */
.ux-banner,
.banner-box,
.product-category {
    height: auto !important;
    min-height: 0 !important;
}

/* Force original aspect ratio in grids */
img.wp-post-image {
    object-fit: contain !important;
}

/* End of image fix */

/* Homepage only: Force 2 equal columns (50%) for product category boxes */
body.home .ux-product-categories .row,
body.home .product-categories,
body.home .ux-product-categories ul.products,
body.home .ux-product-categories .category-box-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px;
    /* Adjust spacing as needed */
}

body.home .ux-product-categories .category-box,
body.home .ux-product-categories li.product-category,
body.home .ux-product-categories .col {
    flex: 1 1 calc(50% - 10px) !important;
    /* ~50% each, accounting for gap */
    max-width: 50% !important;
    box-sizing: border-box;
}

/* Optional: Keep your normal 3-column elsewhere */
body:not(.home) .ux-product-categories .col,
body:not(.home) .ux-product-categories li.product-category {
    flex: 1 1 calc(33.33% - 10px) !important;
    max-width: 33.33% !important;
}

/* Homepage h3 tag that is white but needs to stand out */
.homepageWelcome {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    /* Add a subtle shadow for better contrast */
}

/* Make sure it stays on top of any theme overlays */
.ux-lightbox,
.mfp-wrap,
.quick-edit-modal,
.woocommerce-quick-view {
    z-index: 99999 !important;
}

/*CUSTOM TEMPLATE CATEGORIES*/
.mechanical_table_header {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #fff;
    background-color: #048bf4;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95%;
    max-height: 95vh;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.close:hover {
    color: #ddd;
}

/* Make regular images clickable */
.modal-trigger {
    cursor: pointer;
    transition: opacity 0.2s;
}

.modal-trigger:hover {
    opacity: 0.85;
}

.mechanical_table_header p {
    font-size: 12px !important;
    font-style: italic;
}

/*Hurth Mechanical Shift Category layout*/
/* Replace 'your-category-slug' with the actual slug, e.g. clothing or summer-sale */
.box-image {
    object-fit: scale-down !important;
    width: 70% !important;
    height: 70% !important;
}

h5.header-title {
    text-align: center;
    margin-top: 0px;
    font-size: 1.2em !important;
}

/* Force our modal above everything (Flatsome + Quick Editor) */
.image-editor-modal {
    z-index: 999999999 !important;
}

.image-editor-modal .image-editor-content {
    z-index: 1000000000 !important;
}

/*category boxes on Hurth pages*/
.col-inner {
    border-radius: 10px !important;
}

.box-text.text-center {
    top: 5px !important;
    height: 65px !important;
}

.box-image {
    margin-top: 100px !important;
}

.box-text.box-text-products.text-center.grid-style-2 {
    top: -100px !important;
}

#help_with_mech_shift {
    display: none !important;
}

.image_grid a {
    text-align: center;
    background-color: #aaa;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 30px;
    padding-bottom: 20px;
    width: 100% !important;
    font-size: 1.5em !important;
    margin-left: 0px !important;
    margin-right: 0px !important;
}

.image_grid h5 {
    width: 100% !important;
}

.image_grid td {
    text-align: center;
    padding: 0px !important;
}

.image_grid div {
    text-align: center;
    padding: 0px !important;
}
/* .has-equal-box-heights .box-image img{
    max-height:250px!important;
} */
.product-small .box-image img{
    max-height:250px!important;
}
/*mobile definition*/
@media (max-width: 800px) {
    .image_grid {
        display: none !important;
    }
    .image_grid_mobile{
        display: block !important;
        text-align: center;
        margin-top: 20px;
        font-weight: bold;
        width: 100% !important;
    }
    .image_grid_mobile td{
        text-align: center;
        padding: 0px !important;
        border:1px solid #ccc;
        border-radius: 5px;
    }
    .image_grid_mobile a{
        text-align: center;
        font-size: 1.6em !important;
        color: #048bf4 !important;
    }
}

/*  Custom CSS for bbm-flatsome child theme description move and category hide
    Add your custom styles below this comment
*/
/* Style the moved description */
.product-long-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.product-long-description h2 {
    font-size: 1.4em;
    margin-bottom: 15px;
}

/*Hide class posted_in so the categories do not show on the products page, which ones the product are in*/
.posted_in {
    display: none !important;
}

/*SIMPLE TABLE FORMATTING*/
.simple-transmission-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.simple-transmission-table th,
.simple-transmission-table td {
    border: 0px solid #ddd;
    padding: 0px;
    text-align: left;
}

.simple-transmission-table th {
    background-color: #f4f4f4;
}

/*AutoLinker a tag format*/
.autolinker {
    color: #048bf4 !important;
    font-weight: bold !important;
}

.autolinker:hover {
    text-decoration: underline !important;
}
/*category changes to images and header cat text*/
.col-inner .box-image {
    object-fit: contain !important;
    width: 96% !important;
    height: auto !important;
    
}
.description-category-top-text{
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 20px;
    font-weight:bold;
}
/* Make whole product card clickable */
.woocommerce ul.products li.product {
  position: relative;
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Keep buttons and other interactive elements above the link */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
  position: relative;
  z-index: 2;
}

.quick-view{
    display: none!important;
}
.title-wrapper a{
    font-weight:bold !important;
    font-size:1.3em!important;
}
.product-sku{
    font-weight:bold !important;
    font-size:1.2em !important;
    color:#048bf4 !important;
}
#marine_tran_part_header{
    text-align:center!important;
    font-size:1.5em !important;
    font-weight:bold !important;
    margin-bottom:20px !important;
}