body.home,
body.page,
body.single-post,
.widgets-section,
.woocommerce-widgets-wrapper {
	// General margins
	[class*='wp-block-'] {
		//margin-bottom: 2.5rem;

		[class*='wp-block-'] {
			//margin-bottom: 0;
		}

		&.alignfull {
			width: 100%;
			margin-left: 0;
			margin-right: 0;
			@media screen and (min-width: 1050px) {
				width: calc(100vw - 200px - $scrollbar_width);
				margin-left: calc(-100vw / 2 + 100% / 2 + 100px + $scrollbar_width / 2);
				margin-right: calc(-100vw / 2 + 100% / 2 + 100px + $scrollbar_width / 2);

			}
		}
	}

	&.post-template-wp-custom-template-custom-template {
		[class*='wp-block-'] {
			&.alignfull {
				@media screen and (min-width: 1050px) {
					width: 100vw;
					margin-left: calc(-100vw / 2 + 100% / 2);
					margin-right: calc(-100vw / 2 + 100% / 2);
				}
			}
		}
	}

	.wp-block-cover.alignleft,
	.wp-block-cover.alignright,
	.wp-block-image.alignleft,
	.wp-block-image.alignright {
		margin-top: 1rem;
		margin-bottom: 1rem;
	}

	.wp-block-gallery.alignleft,
	.wp-block-gallery.alignright {
		margin-top: 1rem;
		margin-bottom: 0.25rem;
	}

	.entry-content {
		> h1,
		 > h3,
		 > h4,
		 > h5,
		 > h6,
		 > hr,
		> h2 {
			margin-top: 2.5rem;
		}

		> p {
			margin-bottom: 1rem;
		}

		> p + *:not(p) {
			margin-top: 2.5rem;
		}

		> hr {
			margin-bottom: 2.5rem;
		}

		.wp-block-gallery + h1,
		.wp-block-gallery + h2,
		.wp-block-gallery + h3,
		.wp-block-gallery + h4,
		.wp-block-gallery + h5,
		.wp-block-gallery + h6,
		.wp-block-gallery + hr {
			margin-top: 1.75rem;
		}
	}

	.wp-block-cover,
	.wp-block-gallery,
	.wp-block-image figure {
		a {
			// remove link underline
			background-image: unset !important;
			text-decoration: underline;
		}

		&.alignright {
			margin-left: 2rem;
			margin-bottom: 1.5rem;
		}

		&.alignleft {
			margin-right: 2rem;
			margin-bottom: 1.5rem;
		}
		@include media-breakpoint-down(md) {
			&.alignleft,
			&.alignright {
				width: 50%;
			}

			&.alignright {
				margin-left: 1em;
			}

			&.alignleft {
				margin-right: 1em;
			}
		}
	}
	// Logo
	.wp-block-site-logo {
		text-align: center;
		&.aligncenter {
			text-align: center;
		}
		a {
			background-image: none !important;
		}
	}
	// Query Loop
	.wp-block-query {
		ul li {
			.wp-block-post-featured-image {
				margin-left: 0;
				margin-right: 0;
				width: 100%;
				a {
					background-image: none !important;
					display: block;
				}
			}
		}
	}
	// Files
	.wp-block-file {
		position: relative;

		.wp-block-file__button {
			background-image: none;
			padding: 8px 25px;
			margin-bottom: 0;
			float: right;
		}
	}
	//Image
	.wp-block-image {
		margin-bottom: 1.5em;
		position: relative;
		max-width: none;

		figcaption {
			padding: 0 15px;
		}
	}
	// Code & Preformatted
	.wp-block-code,
	.wp-block-preformatted {
		font-size: 0.9rem;
		font-family: Menlo, Consolas, monaco, monospace;

		code {
			background: transparent;
		}
	}

	.wp-block-column {
		margin-bottom: 0;
		// margin-left: 24px;
		// margin-right: 24px;
		@media screen and (max-width: 1023px) {
			flex-basis: 100%;
			margin: 0 !important;
		}

		&:last-child {
			@media screen and (min-width: 600px) {
				margin-right: 0;
			}
		}
	}

	.wp-block-columns {
		@media screen and (max-width: 1023px) {
			flex-direction: column;
		}
	}
	// Quotes & Pullquotes
	.wp-block-pullquote,
	.wp-block-quote {
		text-align: left;

		&:before {
			content: none;
		}

		blockquote {
			margin-bottom: 0;

			&:before {
				content: none;
			}
		}

		p {
			font-size: 1.15rem;
			font-weight: normal;
			font-style: normal;
			line-height: 1.6;
			color: inherit;
		}

		cite {
			font-size: 1rem;
			text-transform: none;
			color: inherit;
			opacity: 0.5;
		}

		&.is-style-large {
			p {
				font-size: 1.375rem;
			}
		}

		&.alignleft {
			max-width: none;

			blockquote {
				text-align: left;
			}
		}

		&.alignright {
			max-width: none;

			blockquote {
				text-align: right;
			}
		}
	}
	.wp-block-buttons {
		.wp-block-button {
			margin-top: 0;
		}
	}
	// Buttons
	.wp-block-button {
		margin-top: 2.5rem;
		text-align: center;

		&.aligncenter {
			text-align: center;
		}

		&.alignleft,
		&.alignright {
			margin-top: 1rem;
			margin-bottom: 1rem;
		}

		.wp-block-button__link {
			font-size: 1rem;
		}

		&:not(.wc-block-grid__product-add-to-cart) {
			.wp-block-button__link {
				background-image: none;
				display: inline-block;
				margin-bottom: 0;
				line-height: 1.8;
			}
		}

		&.is-style-squared {
			.wp-block-button__link {
				&:hover {
					opacity: 0.8;
				}
			}
		}

		&.is-style-outline {
			.wp-block-button__link {
				border: 2px solid currentcolor;

				&:hover {
					background-size: 0 100%;
				}
			}
		}
	}
	// Cover Images
	.wp-block-cover {
		display: flex;
		-ms-overflow-style: none;
		padding: 2.5rem 25px;
		-ms-overflow-style: none;
		overflow: -moz-scrollbars-none;

		@media all and (min-width: 1024px) {
			padding: 2.5rem;
		}

		&::-webkit-scrollbar {
			display: none;
		}

		&.alignfull,
		&.alignwide {
			padding: 2.5rem 25px;
			width: auto;

			@media all and (min-width: 1024px) {
				padding: 5rem;
			}
		}
		// fixed background
		&.has-parallax {
			background-attachment: fixed;
			background-position: center;
			background-repeat: no-repeat;
			background-size: cover;
		}

		.wp-block-cover__inner-container {
			max-width: 820px;
		}

		.wp-block-cover-text {
			font-size: 1.375rem;
			line-height: 2;
			color: #FFF;
			margin: 0 10%;
		}

		&.alignleft {
			p {
				text-align: left;
			}
		}

		&.alignright {
			p {
				text-align: right;
			}
		}
	}
	// Group
	.wp-block-group {
		.wp-block-group__inner-container {
			> [class*='wp-block-'],
			> * {
				margin-bottom: 2.5rem;

				&:not(.alignwide):not(.alignfull) {
					margin-left: auto;
					margin-right: auto;
					max-width: 820px;
				}
			}
		}
	}
	// Tables
	.wp-block-table {
		&.is-style-stripes {
			border-bottom: 0;
		}
	}
	// Galleries
	.wp-block-gallery {
		display: flex;
		margin-bottom: 1.75rem;

		.blocks-gallery-image,
		.blocks-gallery-item {
			figcaption {
				margin-top: 0;
			}
		}

		.blocks-gallery-image {
			margin-bottom: 0;
		}
	}
	// Embeds
	.wp-block-embed {
		.responsive-embed {
			padding-bottom: 0;
			position: initial;
			margin-bottom: 0;
		}

		twitter-widget {
			margin-left: auto;
			margin-right: auto;
		}
	}
	// Media & Text
	.wp-block-media-text {
		.wp-block-media-text__content,
		.wp-block-media-text__media {
			margin-bottom: 0;
		}

		.wp-block-media-text__content {
			@media all and (max-width: 600px) {
				margin-top: 24px;
			}
		}

		&.alignfull {
			&:not(.has-media-on-the-right) {
				.wp-block-media-text__content {
					padding: 0 108px 0 8%;
				}
			}

			&.has-media-on-the-right {
				.wp-block-media-text__content {
					padding: 0 8% 0 108px;
				}
			}
		}
	}
	// Widgets
	.wp-block-archives,
	.wp-block-categories,
	.wp-block-latest-posts,
	ul.wp-block-page-list,
	.wc-block-product-categories {
		li,
		li.wp-block-pages-list__item {
			list-style-type: none;
			margin-bottom: 16px;
		}

		ul.wc-block-product-categories-list,
		ul.children,
		ul.submenu-container {
			margin-top: 16px;
			padding-left: 0;
			margin-left: 16px;
		}

		.wp-block-latest-posts__post-date {
			margin-bottom: 0;
		}

		.wp-block-latest-posts__featured-image a {
			background-image: none !important;
		}

		select {
			background-color: transparent;
		}
	}

	.wc-block-product-categories {
		&.is-dropdown {
			.wc-block-product-categories__dropdown {
				width: 100%;
			}
		}
	}

	.wp-block-video {
		video {
			width: 100%;
		}
	}

	.wp-block-separator {
		margin-top: 24px;
		margin-bottom: 24px;
		clear: both;
	}

	.wc-block-product-search {
		.wc-block-product-search__fields {
			display: block;
			position: relative;

			.wc-block-product-search__field {
				margin-bottom: 0;
				padding: 10px 36px 10px 0;
			}

			.wc-block-product-search__button {
				background-color: transparent;
				box-shadow: none !important;
				bottom: 13px;
				margin: 0;
				position: absolute;
				right: 0;
			}
		}
	}

	.wc-block-all-reviews,
	.wc-block-reviews-by-product,
	.wc-block-reviews-by-category {
		.wc-block-review-list-item__rating__stars {
			top: 2px;
			width: 80px;
		}

		.wc-block-review-list-item__published-date {
			font-size: 16px;
		}
	}

	.wc-block-all-reviews,
	.wc-block-reviews-by-category {
		.wc-block-review-list-item__author {
			font-size: 16px;
		}
	}

	.wp-block-page-list {
		a{
			background-repeat: no-repeat;
			background-position: 0 100%;
			background-size: 100% 100%;
			display: inline;
			transition: 0.2s ease-in-out;
			&:hover {
				background-size: 0 100%;
			}
		}
	}

	.wp-block-latest-comments {
		&.alignwide {
			margin-left: calc( -1100px / 2 + 100% / 2) !important;
		}
		a{
			background-repeat: no-repeat;
			background-position: 0 100%;
			background-size: 100% 100%;
			display: inline;
			transition: 0.2s ease-in-out;
			&:hover {
				background-size: 0 100%;
			}
		}
		.wp-block-latest-comments__comment-author,
		.wp-block-latest-comments__comment-link {
			font-size: 0.95rem;
			line-height: 1.3rem;
		}

		.wp-block-latest-comments__comment-date {
			color: #888888;
			font-size: 14px;
			line-height: 16px;
			float: right;
			margin: 0!important;
			top: 3px;
			position: relative;
		}

		.wp-block-latest-comments__comment-meta {
			margin-bottom: 16px !important;
		}

		.wp-block-latest-comments__comment-excerpt * {
			font-size: 0.9rem;
			line-height: 1.4rem;
		}

		.wp-block-latest-comments__comment {
			margin-bottom: 32px;
		}
	}

	.wp-block-search {
		.wp-block-search__label {
			font-weight: normal;
		}

		.wp-block-search__inside-wrapper {
			clear: both;
			position: relative;
			.wp-block-search__input {
				border: 0;
			}
			.wp-block-search__button  {
				appearance: none;
				background-color: transparent;
				border: 0;
			}
		}
	}

	.wp-block-calendar {
		th, td {
			text-align: center;
		}
	}

    div.wc-block-featured-category {
		@media all and (max-width: 767.98px) {
			display: flex;
		}
	}

	.wp-block-social-links {
		.wp-block-social-link {
			transition: all 0.2s ease-in-out;

			a {
				background-image: none;
				display: block;
				line-height: 0;
				margin: 0;
	            text-decoration: none;
			}
		}
	}
}
//==============================================================================
//	 WooCommerce Blocks
//==============================================================================

.wp-block-woocommerce-handpicked-products {
	&.is-hidden-title {
		.product-info {
			h2 {
				display: none !important;
			}
		}
	}
}

body.page {
	.wc-block-featured-product {
		.wp-block-button {
			margin: 32px 0 0;
		}

		.wc-block-featured-product__description {
			color: #FFF;

			a {
				display: inline-block;
				background-image: linear-gradient(to top, rgb(255,255,255) 1px, rgb(255,255,255) 1px, rgba(255,255,255, 0) 1px, rgba(255,255,255, 0) 1px);
			}
		}
	}
}
