/*
 Theme Name:   Agricola Child Theme
 Theme URI:    https://agricola.axiomthemes.com
 Description:  Agricola Child Theme
 Author:       AxiomThemes
 Author URI:   https://axiomthemes.com/
 Template:     agricola
 Version:      1.0
 Tags:         flexible-header, custom-background, custom-colors, custom-header, custom-menu, featured-image-header, featured-images, full-width-template, microformats, post-formats, theme-options, threaded-comments, translation-ready
 Text Domain:  agricola
*/
.search_modern{
    top: -2px;
}
/* =Theme customization starts here
------------------------------------------------------------ */
.latest-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: stretch; /* Ensures all boxes have the same height */
}

.product-item {
    text-align: center;
    padding: 20px 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Ensures uniform height for all boxes */
}

.product-image {
    overflow: hidden;
    border-radius: 5px;
    display: block;
	text-align:center;
	min-height:220px;
	display: flex;
    align-items: center;
	justify-content:center;
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    transition: transform 0.3s ease-in-out;
    display: inline-block;
}

.product-item:hover .product-image img {
    transform: scale(1.05); /* Zoom effect only on the image */
}

.product-title {
    font-size: 18px;
    margin: 10px 0;
    flex-grow: 1; /* Ensures the title area adjusts for equal height */
}

.product-season {
    font-size: 16px;
    color: #615D58;
    margin-bottom: 0px;
}
/* Responsive Adjustments */
@media (max-width: 1024px) {
    .latest-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .latest-products-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}


/* Product  */
.product-filter {
    text-align: center;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: #f4f4f4;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    transition: background 0.3s ease-in-out;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: #333;
    color: #fff;
}

/* Product Grid */
.latest-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: stretch;
}

.product-item {
    text-align: center;
    padding: 20px 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
}

.product-image {
    overflow: hidden;
    border-radius: 5px;
    text-align: center;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* View Details Icon */
.view-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: none; /* Hide icon by default */
    transition: opacity 0.3s ease-in-out;
}

/* Show Icon on Hover */
.product-image:hover .view-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Popup Styling */
.product-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.popup-content {
    background: #fff;
    padding: 20px;
    max-width: 600px;
    margin: 10% auto;
    border-radius: 10px;
    position: relative;
    text-align: center;
    overflow: auto;
    max-height: 80vh;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}
.popup-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

.popup-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
}

.popup-season {
    font-size: 16px;
    color: #555;
    margin-bottom: 10px;
}

.popup-description {
    font-size: 16px;
    text-align: left;
    line-height: 1.6;
}
/* Responsive Adjustments */
@media (max-width: 1024px) {
    .latest-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .latest-products-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}




/* Machines */
.machine-banner {
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}
.banner-content {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 460px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
}

.banner-content h1 {
    font-size: 54px;
    line-height: 64px;
    color: #fff;
    margin: 0;
    padding: 0 0 10px 0;
}
.banner-content p{
    color: #fff;
    font-size: 16px;
    line-height: 24px;
    margin: 0;
}
@media(max-width:1024px){
    .banner-content {
         min-height: 360px;
    }
    .banner-content h1 {
        font-size: 24px;
        line-height: 54px;
    }
}
@media(max-width:767px){
    .banner-content {
         min-height: 300px;
    }
    .banner-content h1 {
        font-size: 32px;
        line-height: 40px;
    }
}

.machine-container {
    display: flex;
    gap: 40px;
}

.machine-sidebar {
    width: 25%;
}
.machine-sidebar h3 {
    font-size: 30px;
    margin: 0;
    padding-bottom: 30px;
}

.machine-accordion {
    list-style: none;
    padding: 0;
    margin: 0;
}

.machine-category > a {
    display: block;
    padding: 15px 0;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    font-size: 20px;
    border-bottom: 1px solid #E9E9E9;
}
.category-toggle {
    position: relative;
}
.accordion-icon {
    font-size: 18px;
    font-weight: bold;
    margin-right: 10px;
    position: absolute;
    right: 0;
    pointer-events: none;
}

.machine-subcategories {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.machine-subcategories.active {
    max-height: 500px; /* Adjust based on content */
    transition: max-height 0.3s ease-in;
}
.subcategories-inner {
    padding: 10px 0 10px 20px;
    margin: 0;
}

.subcategory-filter {
    display: block;
    padding: 8px;
    cursor: pointer;
    position: relative;
}

.subcategory-filter.active {
    color: #0073aa;
}
.subcategory-filter.active:after {
    content: '';
    width: 22px;
    height: 9px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-5px);
    display: inline-block;
    background: url(images/arrow-right.svg) no-repeat 0 0;
}
.machine-content {
    width: 75%;
}
.machine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.machine-grid.featured-grid {
	grid-template-columns: repeat(4, 1fr);
}
.machine-card {
    background: #F5F9FF;
    text-align: center;
    padding:20px 20px;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.machine-card:hover .machine-image img {
    transform: scale(1.05);
}

.machine-image img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
	height: 170px;
    object-fit: contain;
}
.machine-card-content .machine-title {
    font-weight: 600;
    font-size: 17px;
    line-height: 22px;
    color: #000;
}
.machine-type {
    font-size: 16px;
    margin-top: 30px;
    padding-bottom: 5px;
    color: #615D58;
}
@media(max-width:991px){
    .machine-grid{
        grid-template-columns: repeat(2, 1fr);
        gap:20px;
    }
	.machine-grid.featured-grid {
		grid-template-columns: repeat(3, 1fr);
	}
    .machine-card-content .machine-title {
        font-size: 16px;
    }
}
@media (max-width: 767px) {
	.machine-grid.featured-grid {
		grid-template-columns: repeat(2, 1fr);
	}
    .machine-content{
        width: 100%;
    }
    .machine-sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        width: 250px;
        height: 100%;
        background: #fff;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        transition: left 0.3s ease-in-out;
        z-index: 9999;
        padding: 20px;
        overflow-y: auto;
    }

    .machine-sidebar.open {
        left: 0;
    }

    .sidebar-toggle {
        display: inline-block;
        color: #000;
        background: transparent;
        border: none;
        font-size: 16px;
        cursor: pointer;
        padding: 0;
        width: auto;
        text-align: left;
        margin-bottom: 0;
        position: absolute;
        top: 10px;
    }

    /* Light Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3); /* Light semi-transparent background */
        z-index: 9998; /* Below sidebar */
        transition: opacity 0.3s ease-in-out;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .machine-content {
        margin-left: 0;
    }

    /* Smooth Accordion */
    .machine-subcategories {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .machine-subcategories.active {
        max-height: 500px; /* Adjust as needed */
    }
    .machine-sidebar h3 {
        font-size: 24px;
    }
    .machine-category > a{
        font-size: 17px;
    }
}
@media (max-width: 480px) {
    .machine-grid{
        grid-template-columns: repeat(1, 1fr);
    }
	.machine-grid.featured-grid {
		grid-template-columns: repeat(1, 1fr);
	}
	.sidebar-toggle{
		position:static;
	}
	.machine-content .machine-sort{
		margin-left:0;
		margin-top:10px;
	}
}



/*Single Machine*/
.machine-single-container {
    width: var(--theme-var-page);
    max-width: 100%;
    margin: 0 auto;
}

/* Top Banner */
.machine-banner {
    background: #F5F9FF;
    padding: 40px 0;
    width: 100%;
}

.machine-banner-inner {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Left Column: Image */
.machine-banner-image {
    width: 50%;
}
.machine-banner-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Right Column: Breadcrumbs, Title, Description */
.machine-banner-info {
    flex: 1;
}

.machine-breadcrumbs {
    font-size: 16px;
    color: #777;
    margin-bottom: 10px;
}

.machine-banner .single-machine-title {
    font-size: 56px;
    line-height: 60px;
    font-weight: 500;
    margin-bottom: 10px;
    padding-bottom: 30px;
    margin: 0;
}

.machine-short-desc {
    font-size: 16px;
    color: #444;
    margin-bottom: 40px;
}

.machine-contact-btn {
    display: inline-block;
    background: #178CD7;
    color: #fff;
    font-family: halyard-display, sans-serif;
    font-size: 14px;
    font-weight: 500;
    font-style: normal;
    line-height: 21px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
        padding: 18px 40px;
}

.machine-contact-btn:hover {
    background: #0081b7;
    color: #fff;
}

/* Content Section */
.single-machine-content {
    padding: 0px;
}
.single-machine .content,.single-machine .content_wrap{
    width: 100% !important;
}

/* Popup Overlay */
.machine-popup-overlay {
    display: none; 
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

/* Popup Box */
.machine-popup-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    width: 600px;
    max-width: 90%;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* Close Button */
.machine-popup-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size:33px;
    cursor: pointer;
    font-weight: 400;
    width: 30px;
    height: 30px;
    text-align: center;
}
h2#popup-machine-title {
    margin: 0;
    padding: 0 0 30px 0;
}


@media(max-width:1024px){
    .machine-banner-inner{
        flex-direction: column;
    }
    .machine-banner-image {
        width: 100%;
        text-align: center;
    }
    .machine-banner-image img{
        max-height: 400px;
        width: auto;
    }
    .machine-banner-info {
        text-align: center;
        width: 100%;
    }
    .machine-banner .single-machine-title{
        font-size: 40px;
        line-height: 50px;
        padding-bottom: 20px;
    }
}


/*Search Page*/
.search-results .content{
    padding: 80px 0;
}
.search-results .post_layout_classic{
    text-align: center;
}
.search-results .posts_container.columns_wrap .column-1_3{
    width: 25%;
}
.search-results .posts_container.columns_wrap .post_layout_classic {
    background: #F5F9FF;
    text-align: center;
    padding: 20px 20px;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3sease;
}
.search-results .posts_container.columns_wrap .post_layout_classic .post_title {
    font-family: inherit;
    font-weight: 600;
    font-size: 17px;
    line-height: 22px;
    color: #000;
}
.search-results .posts_container.columns_wrap .post_layout_classic .post_meta {
    display: none;
}
@media(max-width:991px){
    .search-results .content{
        padding: 40px 0;
    }
    .search-results .posts_container.columns_wrap .column-1_3{
        width: 33.333%;
    }
    .search-results .posts_container.columns_wrap .post_layout_classic .post_title {
        font-size: 16px;
    }
}
@media(max-width:767px){
    .search-results .posts_container.columns_wrap .column-1_3{
        width: 50%;
    }
}


.machine-sort {
	max-width: 230px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    margin-bottom: 10px;
}
.machine-sort label {
	white-space: nowrap;
}
.machine-content .machine-sort select {
	padding-right: 1em !important;
}
.user-card span{
	font-size:12px;
	display:block;
}