/*
 Theme Name:     Myyntimaatio
 Theme URI:      https://myyntimaatio.fi
 Description:    Myyntimaation Hello Themen lapsiteema.
 Author:         Myyntimaatio
 Author URL:     https://myyntimaatio.fi
 Template:       hello-elementor
 Version:        2.1.3
*/

/* NAV MENU */
  .mm-nav-menu a{
	padding: 10px 0px !important;
	margin: 10px 20px 10px 20px;
}
/* .mm-nav-menu .menu-item {
	padding: 0px 10px 0px 10px;
}
 */
.mm-nav-menu .menu-item-has-children .menu-item:before {
	content: '';
	height: 20px;
	width: 0px;
	background: #8C1B33;
	display: block;
	position: absolute;
	top: 10px;
	transition: all .35s;
}

.mm-nav-menu .menu-item-has-children .menu-item:hover:before {
	width: 10%;
}
/* 
.mm-nav-menu a::after {
	width: 100% !important;
} */


/* BREADCRUMBS */
.custom__breadcrumbs .elementor-shortcode a, .custom__breadcrumbs .elementor-shortcode span{
	color: #151515;
	font-family: "Inter", Sans-serif !important;
	text-transform: uppercase;
}

.back-button .elementor-button-icon svg, 
.back-button__container .elementor-button-icon svg {
	width: 30px;
}

.tuote__custom-breadcrumbs .woocommerce-breadcrumb a:first-child {
	display: none;
}
.tuote__custom-breadcrumbs .woocommerce-breadcrumb {
	margin-bottom: 1px;
}

/* BUTTON */
.custom__button, .custom__button-blue {
	width: 300px !important;
}
.custom__button a, .custom__button-blue a{
  display: block;
  width: 100% !important;
  height: 60px;
  text-decoration: none;
  box-shadow: 0px 3px 6px #00000029 !important;
  text-align: center;
  position: relative;
  transition: all .35s;
}

.custom__button .elementor-button-text, .custom__button-blue .elementor-button-text{
	text-align: start;
    padding-left: 10px;
}
.custom__button .elementor-button, 
.custom__button-blue .elementor-button {

}
.custom__button a span, .custom__button-blue a span{
  position: relative;
  z-index: 2;
}
.custom__button a:before, .custom__button-blue a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5%;
    background: #990031;
    transition: .3s ease-in all;
    border-radius: 0px 17px 17px 0px;
  }

.custom__button a:after{
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: #990031;
  transition: all .35s;
}

.custom__button-blue a:after{
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: #004276;
  transition: all .35s;
}

.custom__button a:hover:after, .custom__button-blue a:hover:after{
  width: 100%;
}

/* LOGO SLIDER */
.mm-etusivu__carousel .eael-lc-logo img{
	width: 150px !important;
	height: 150px;
    object-fit: contain;
}


/* MAGAZINE SECTION*/
.mm__section-magazine .elementor-button-wrapper {
	width: 100%;
	background-color: #990031;
}
.mm__section-magazine .elementor-button-icon {
	position: absolute;
    right: 5%;
}

.mm__section-magazine__container .elementor-button-wrapper {
	height: 65px;
	display: flex;
    align-items: center;
    justify-content: center;
}

/* ETUSIVU CAROUSEL */
.etusivu__post-slider .wb_ps_single_item {
	display: flex !important;
	align-items: center !important;
}

.etusivu__post-slider .wb_ps_single_item .wb_ps_thumbnail {
	flex-shrink: 1;
}
.etusivu__post-slider .wb_ps_single_item .wb_ps_content {
	flex-shrink: 2;
}
.etusivu__post-slider .wb_ps_single_item a {
	 pointer-events: none; 
      cursor: default; 
}

.etusivu__post-slider .wbel-arrow {
	border: none !important;
}
/* NEWSLETTER */
.newsletter__container input, .contact__wrapper input{
	border-radius: 0px !important;
	font-family: "Raleway", Sans-serif !important;
}
.newsletter__container textarea, .contact__wrapper textarea {
	border-radius: 0px !important;
	font-family: "Raleway", Sans-serif !important;
}
.newsletter__container label, .contact__wrapper label {
	color: white !important;
}
.newsletter__container button, .contact__wrapper button {
	height: 40px !important;
	width: 100px !important;
	border-radius: 0px !important;
	font-family: "SplineSans", Sans-serif !important;
	text-transform: uppercase;
}

/* .newsletter__container-email-from input {
	width: 350px !important;
} */

/* TUOTTEET */

.tuotteet__container .products li {
	width: 300px !important;
	height: 300px !important;
}

.tuotteet__container .products img {
	height: 300px !important;
	object-fit: cover;
}

.tuotteet__container .woocommerce {
	display: grid;
	justify-content: center;
}

.tuotteet__container .woocommerce-loop-category__title {
	position: absolute;
	bottom: 15%;
	height: 50px;
	width: 100%;
	color: white !important;
	background: #990031;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .35s;
}
.tuotteet__container .woocommerce-loop-category__title .count {
	display: none;
}
.tuotteet__container .woocommerce-loop-category__title:hover {
	background: black;
}

.tuotteet__container .woocommerce-loop-category__title:hover:after{
	content: '\2023';
	position: absolute;
	right: 20px;
	font-size: 35px;
}

.tuotteet__container-category .products li{
/* 	width: 300px !important; */
	height: 215px;
	box-shadow: 0px 3px 6px #00000029 !important;
}
.tuotteet__container-category .product a img {
	max-height: 165px !important;
}
.tuotteet__container-category .star-rating,
.tuotteet__container-category .woocommerce-loop-product__title
{
	display: none !important;
}
.tuotteet__container-category .button {
	position: absolute !important;
	bottom: 0;
	width: 100%;
	height: 50px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	background: #990031 !important;
	color: white !important;
	text-transform: uppercase;
	transition: all .35s;
}
.tuotteet__container-category .button:hover {
	background: black !important;
}
.tuotteet__container-category .button:hover:after{
	content: '\2023';
	position: absolute;
	right: 20px;
	font-size: 35px;
}

.tuotteet__category-banneri {
	background-position: center;
	background-size: cover;
}

.posts__grid .elementor-post__thumbnail__link {
	margin-bottom: 0px;
}

.posts__grid .elementor-post__read-more {
	margin-bottom: 0px !important;
	padding: 20px;
	color: white;
}
.posts__grid .elementor-post__text {
	background: #8C1B33;
}

.posts__grid .elementor-post__thumbnail img {
	width: 170px !important;
	object-fit: contain;
}
/* YRITYS */

.mm-yritys__carousel .swiper-slide-image {
	height: 400px;
    width: 100%;
    object-fit: cover;
}

.mm-yritys__carousel .elementor-swiper-button {
	transform: translateY(0%);
}

/* VUOKRAKONEET */
.mm-vuokrakoneet__accordion .accordion__item .accordion__body {
	padding: 0px !important;
}
.mm-vuokrakoneet__accordion .accordion__item {
	margin-bottom: 10px !important;
	border: none !important;
}
.helpie-faq.accordions .accordion .accordion__item .accordion__header div.accordion__title {
	font-weight: 400 !important;
}
.mm-vuokrakoneet__accordion .accordion__header {
	padding-left: 35px !important;
	background-color: #8C1B33 !important;
	color: white !important;
	font-family: "Raleway";
    font-size: 20px;
}

.mm-vuokrakoneet__accordion table tbody>tr:nth-child(odd)>td, table tbody>tr:nth-child(odd)>th {
	background-color: rgba(153, 0, 49, 0.07);
}

.mm-vuokrakoneet__accordion .accordion__header:hover {
	background-color: #174272 !important;
}
.mm-vuokrakoneet__accordion .active {
	background-color: #174272 !important;
}

.mm-vuokrakoneet__accordion .helpie-faq.accordions .accordion__header:before, 
.mm-vuokrakoneet__accordion .helpie-faq.accordions .accordion__header:after {
    background: white;
}

.mm-vuokrakoneet__accordion .accordion__body tr td:first-child {
	width: 80%;
}

/* YHTEYSTIEDOT */

/* CONTACT FORM*/




/* MEDIA */
@media all and (max-width: 1320px) { 
	.tuotteet__container .products li {
		width: auto !important;
		height: auto !important;
	}
}

@media all and (max-width: 1240px) {
	.mm-nav-menu .elementor-nav-menu a{
		font-size: 15px !important;
	}
	.mm-nav-menu__button a{
		font-size: 14px !important;
	}
	.mm-nav-menu__button .elementor-align-icon-right {
		margin-left: 30px !important;
	}
	.mm-tuotteet__container-cards .elementor-widget-wrap {
		width: auto;
	}
}

@media all and (max-width: 1200px) {
	.custom__button a, .custom__button-blue a {
		width: 220px;
		height: 50px;
		font-size: 16px !important;
	}
	.custom__button .elementor-align-icon-right, .custom__button-blue .elementor-align-icon-right {
		margin-left: 10px !important;
	}
	.newsletter__container button, .contact__wrapper button {
		width: 150px !important;
		height: 40px !important;
	}
}

@media all and (max-width: 1024px) {
	.mm__section-magazine__container .elementor-button-wrapper {
		height: auto;
	}
	
	.etusivu__post-slider .slick-slide {
		display: flex;
		justify-content: center;
	}
	.etusivu__post-slider .wb_ps_single_item {
		flex-direction: column;
		width: 500px;
	}
	
	.tuotteet__container-category .product a img {
		height: 160px !important;
	}
	
	
	/* BUTTON */
	 .elementor-button:focus{
		color: #990031 !important;
	}
	.custom__button a:hover:after, .custom__button-blue a:hover:after{
 	   width: 0%;
	}
	
}
@media all and (max-width: 768px) {
	.mm-tuotteet__container-cards .elementor-column-wrap {
		display: flex;
		justify-content: center;
	}
	
	.mm-yhteystiedot-employees .elementor-column {
		justify-content: center;
	} 
	.mm-yhteystiedot-employees .elementor-column-wrap {
		width: 300px;
	}
	
	.etusivu__post-slider .wb_ps_single_item {
		width: 100%;
	}
	
	.tuotteet__container-category .products li {
		width: 230px;
		height: 180px;
	}
	
	.tuotteet__container-category .product a img {
		object-fit: contain;
		height: 140px !important;
	}
	.tuotteet__container-category .button {
		font-size: 12px !important;
	}
	/* BUTTON */
	.custom__button, .custom__button-blue {
		width: 200px !important;
	}	
}
// Salli WooCommerce API -pyynnöt selaimesta
add_action('rest_api_init', function() {
    remove_filter('rest_pre_serve_request', 'rest_send_cors_headers');
    add_filter('rest_pre_serve_request', function($value) {
        header('Access-Control-Allow-Origin: *');
        header('Access-Control-Allow-Methods: GET');
        header('Access-Control-Allow-Credentials: true');
        return $value;
    });
}, 15);