/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* Faulty Styles */
html body .wd-search-area .wd-scroll-content{
	padding-block: 0 !important;
}
.wd-sticky-btn-cart .frs_meta_container {
    display: none;
}
.wd-sticky-btn-cart .frs_values_container {
    display: none;
}

form.searchform.wd-cat-style-bordered.woodmart-ajax-search,
.search-info-text {
    display: none;
}
html body .wd-search-area .wd-scroll-content {
    height: auto;
    padding-block: 20px;
    transition: all .6s ease;
}
html body .wd-scroll-content {
    overflow: visible;
    -webkit-overflow-scrolling: touch;
	height: 0;
    max-height: 0;
}
html body .wd-search-full-screen .wd-search-area {
    height: auto;
}
html body .wd-search-full-screen.wd-opened {
    overflow-y: auto;
    margin: 0;
    background: white;
    height: auto;
    max-height: 100%;
    width: auto;
    max-width: 100%;
}
html body .wd-search-full-screen .wd-close-search, html body .wd-search-full-screen .wd-close-search.wd-style-icon {
    display: inline-flex;
    position: relative;
    left: 100%;
    transform: translateX(-100%);
    margin: -1rem;
}
html body span.wd-close-search.wd-action-btn.wd-style-icon.wd-cross-icon {
    --wd-action-icon-size: 12px;
    line-height: 1;
}
html body .wd-search-full-screen .wd-close-search.wd-style-icon>a {
    width: 64px;
    height: 26px;
    background: var(--btn-accented-bgcolor);
    color: white;
    border-radius: 16px;
}
html body div:where(.swal2-container).swal2-center>.swal2-popup {
    justify-items: center;
}
html body div:where(.swal2-container) h2:where(.swal2-title) {
    padding: 0;
}
button.swal2-confirm.swal2-styled {
    background: var(--wd-primary-color);
    color: white;
}
button.swal2-cancel.swal2-styled {
    background: grey;
    color: white;
}

/* Custom Advanced Search Styling */
.new-search-bar {
    display: flex;
	flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.new-search-bar-wrapper {
    background: #f9f9f9;
    width: 100%;
    display: flex;
    gap: 10px;
    flex-grow: 1;
    border: 1px solid grey;
}

#new--search-input.search-input {
	max-height: 50px;
    flex-grow: 1;
    border: none;
    font-size: 12px;
    padding: 0 1rem 0 0;
}

#new-search-type-toggle.search-toggle {
    max-height: 50px;
	width: 125px;
    color: white;
    border: none;
    padding: 0 0 0 1rem;
    background-color: var(--btn-accented-bgcolor-hover);
    cursor: pointer;
    font-size: 12px;
}

@media only screen and (max-width:767px) {
div#product-filters, div#supplier-filters {
    gap: 0.5rem;
}
input[type='email'], input[type='date'], input[type='search'], input[type='number'], input[type='text'], input[type='tel'], input[type='url'], input[type='password'], textarea, select{
	height: 50px !important;
	}
button#new--submit-button {
    width: 100%;
    height: 50px;
}
.new-search-bar-wrapper{
		margin: 1rem 0 0 0;
		display: flex;
		flex-direction: column;
}
#new--search-input.search-input {
    flex-grow: 1;
    border: none;
    font-size: 12px;
    padding: 0 1rem;
}
#new-search-type-toggle.search-toggle {
    width: 100%;
}
}

#new--submit-button {
	max-height: 50px;
    width: auto;
    background-color: var(--btn-accented-bgcolor-hover);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

#new--submit-button i {
    margin-right: 5px;
}


#new-search-type-toggle:hover, #new--submit-button:hover, a.subscribe-button:hover {
	background-color: rgb(100, 48, 110, 0.25);
    color: var(--btn-accented-bgcolor-hover);
}

html body .wd-search-full-screen .wd-close-search.wd-style-icon>a:hover{
		background-color: rgb(239,124,82, 0.25);
    	color: var(--btn-accented-bgcolor);
}


/* Product and Supplier Item Styling */
.product-item, .supplier-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    background-color: #fff;
    text-align: center;
}

.product-item img, .supplier-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

div#filter-section {
    padding: 1rem 0 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}
.product-cat, .product-price, .supp-location, .supp-cert {
    display: flex;
    flex: 1 1 0;
    flex-direction: row;
}
.product-cat label, .product-price label, .supp-location label, .supp-cert label{
    display: none;
}

h3#filter-heading {
    font-size: var(--wd-text-font-size);
    font-weight: bold;
    text-align: center;
    margin: 0;
    padding: 1rem;
}
@media only screen and (max-width:640px){
h3#filter-heading {
        width: 100%;
}
}

div#product-filters, div#supplier-filters {
    display: flex;
	flex-direction: column;
    flex: auto;
	font-size: 12px;
}
@media (width>640px){
div#product-filters, div#supplier-filters {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: auto;
}
}
#product-filters div,  #supplier-filters div{
    flex: auto;
}
#product-filters label, #supplier-filters label {
	padding: 0 0 0 1rem;
}
#product-filters select, #supplier-filters select {
    max-height: 50px;
    color: white;
    background-color: var(--btn-accented-bgcolor-hover);
    padding: 0 0 0 1rem;
}


#product-filters select:hover,  #supplier-filters select:hover{
	background-color: rgb(100, 48, 110, 0.25);
    color: var(--btn-accented-bgcolor-hover);
}



/* Autocomplete Suggestions Styling */
.autocomplete-results {
    position: absolute;
    top: 105%;
    left: 0;
    width:100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    z-index: 999;
    list-style: none;
    margin: 0;
    padding: 0;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.autocomplete-item:hover {
   	background-color: rgb(100, 48, 110, 0.25);
    color: var(--btn-accented-bgcolor-hover);
}



/* Search Results Styling */
.new-search-results-wrapper {
    margin-top: 20px;
}

.loading {
    font-style: italic;
    color: #666;
}

.error {
    color: #e74c3c;
    font-weight: bold;
}



/* Result Page */
/* .results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
} */

.search-results-grid, .best-selling-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 items per row */
    gap: 20px;
}

@media (max-width: 1200px) {
    .search-results-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 items per row on smaller screens */
    }
}

@media (max-width: 768px) {
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 items per row on tablets */
    }
}

@media (max-width: 480px) {
    .search-results-grid {
        grid-template-columns: 1fr; /* 1 item per row on mobile */
    }
}

.product-item, .supplier-item {
    border: 1px solid #ddd;
    border-radius: 5px;
/*     padding: 15px; */
    background-color: #fff;
    text-align: center;
}

.product-item img, .supplier-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    aspect-ratio: 1;
    object-fit: cover;
}

/* .blurred-content {
    position: relative;
    overflow: hidden;
    filter: blur(5px);
    pointer-events: none;
}
 */
.blurred-content {
    display: flex;
    filter: blur(5px);
    pointer-events: none;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.blurred-text{
	text-align: center;
    color: #333;
    font-weight: bold;
    width: 100%;
}

/* .blurred-text, .cta-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #333;
    font-weight: bold;
    width: 100%;
    padding: 0;
    margin: 0;
} */

/* .cta-message {
	background-color: var(--btn-accented-bgcolor-hover);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} */

.view-products-link {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: var(--btn-accented-bgcolor-hover);
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.view-products-link:hover {
    background-color: rgb(100, 48, 110, 0.25);
    color: var(--btn-accented-bgcolor-hover);
}



/* Subscription Message Styling */
.subscription-message {
    display: flex;
	grid-column: span 4;
	background-color: white;
    margin-bottom: 20px;
    padding: 1rem 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
}

.subscription-message h2 {
    font-size: var(--wp--preset--font-size--medium);
    color: black;
	padding: 1rem;
}

.subscribe-button {
    padding: 12px 25px;
    background-color: var(--btn-accented-bgcolor-hover);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    max-width: 150px;
    margin: 1rem auto;
}

.subscribe-button:hover {
    background-color: var(--btn-accented-bgcolor-hover);
}