/*
	Theme Name:   Potiskarium
	Theme URI:    https://potiskarium.cz/potiskarium-theme
	Description:  Téma pro Potiskárium
	Author:       Karel
	Author URI:   https://zavadil.eu
	Template:     twentytwentyfour
	Version:      1.4.0
*/

:root {
	--brand-color: #4f3258;
	--brand-color-highlight: #71487c;
	--secondary-brand-color: #945fa5;
	--secondary-brand-color-highlight: #b378c6;
}

/* italic menus */
.product-categories-menu a,
.collapsible-categories-menu a {
	font-family: Cardo, serif;
	font-weight: bold;
}

.wp-block-potiskarium-theme-logo-block {
	display: flex;
	align-items: center;
}

.potiskarium-logo {
	display: block;
	max-width: 100%;
	overflow: hidden;
}

.potiskarium-logo img {
	max-width: 100%;
}

.woocommerce-tabs h2 {
	display: none;
}

.woocommerce-cart .wp-block-post-title {
	max-width: var(--wp--style--global--wide-size) !important;
}

a:focus,
button:focus {
	outline: none !important;
}

.background-brand {
	background-color: var(--brand-color);
}

.background-brand-secondary {
	background-color: var(--secondary-brand-color);
}

.background-brand a,
.background-brand-secondary a {
	color: white;
}

.flex-1 {
	flex: 1;
}

.flex-nowrap {
	flex-wrap: nowrap;
}

.wp-element-button,
.wp-block-button__link,
.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button,
.wc-block-components-button {
	text-wrap: nowrap !important;
	color: white !important;
	background-color: var(--brand-color) !important;
}

.wp-element-button:hover,
.wp-block-button__link:hover,
.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button:hover,
.wc-block-components-button:hover {
	color: white !important;
	background-color: var(--brand-color-highlight) !important;
}

.woocommerce-MyAccount-navigation-link--downloads {
	display: none;
}

/* PRODUCT LISTING */

.wc-block-components-product-image img {
	width: auto;
}

/* HORIZONTAL MENU */

.product-categories-menu {
	overflow: hidden;
	margin: 0;
	padding: 0;
}

.product-categories-menu ul {
	margin: 0;
	padding: 0;
	list-style-type: none;
	display: flex;
}

.product-categories-menu li.active > a {
	font-weight: bold;
}

.product-categories-menu a {
	text-wrap: nowrap;
	text-decoration: none;
	display: block;
	margin: 0;
	padding: 5px 1rem;
}

.product-categories-menu a:hover {
	background-color: rgba(255, 255, 255, 0.3);
}

.product-categories-menu ul.product-categories-submenu {
	background-color: var(--secondary-brand-color);
	display: none;
	position: absolute;
	z-index: 10000000;
}

.product-categories-menu li.product-category-item:hover ul.product-categories-submenu {
	display: block;
}

/* COLLAPSIBLE MENU */

.collapsible-categories-menu {
	width: 330px;
	margin: 0;
	font-size: 120%;
}

.collapsible-categories-menu ul {
	display: block;
	margin: 0;
	padding: 0;
	list-style-type: none;
}

.collapsible-categories-menu li {
	margin: 5px 0 0 0;
}

.collapsible-categories-menu li.active > a,
.collapsible-categories-menu li.active > a:hover {
	background-color: var(--secondary-brand-color) !important;
	cursor: default;
}

.collapsible-categories-menu a {
	display: flex;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
	color: white;
	text-decoration: none;
	padding: 10px 15px;
}

.collapsible-categories-menu a > div {
	display: flex;
	align-items: center;
	gap: 10px;
}

.collapsible-categories-menu .collapsible-category-item-checkbox-label {
	display: block;
	content: ' ';
	background-image: url('img/plus.svg');
	background-color: rgba(255, 255, 255, 0.3);
	background-position: center;
	background-repeat: no-repeat;
	width: 20px;
	height: 20px;
	line-height: 20px;
	margin: 0;
	padding: 2px;
	border-radius: 50%;
}

.collapsible-categories-menu .collapsible-category-item-checkbox-label:hover {
	background-color: rgba(255, 255, 255, 0.5);
}

.collapsible-categories-menu .expanded > a > div .collapsible-category-item-checkbox-label {
	background-image: url('img/minus.svg');
}

.collapsible-categories-menu ul.collapsible-subcategories-list {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	margin: 0;
	transform: translateY(-6px);
	transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
}

.collapsible-categories-menu .expanded > ul.collapsible-subcategories-list {
	max-height: 800px;
	opacity: 1;
	margin: initial;
	transform: translateY(0);
	transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
}

.collapsible-category-count {
	background-color: rgba(255, 255, 255, 0.3);
	font-size: 50%;
	padding: 1px 10px;
	border-radius: 5px;
}

/* root categories */

.collapsible-categories-menu li.collapsible-category-item {
	background-color: var(--brand-color);
}

.collapsible-categories-menu li.collapsible-category-item a:hover {
	background-color: var(--brand-color-highlight);
}

/* subcategories */

.collapsible-categories-menu ul.collapsible-subcategories-list li {
	background-color: var(--brand-color);
	margin: 5px;
}

.collapsible-categories-menu ul.collapsible-subcategories-list a {
	padding: 5px 10px 5px 45px;
}

.collapsible-categories-menu ul.collapsible-subcategories-list a:hover {
	background-color: var(--brand-color-highlight);
}

/* third level and more */

.collapsible-categories-menu ul.collapsible-subcategories-list .collapsible-subcategories-list li {
	background-color: var(--brand-color);
}

.collapsible-categories-menu ul.collapsible-subcategories-list .collapsible-subcategories-list a {
	padding: 5px 5px 5px 75px;
}

.collapsible-categories-menu ul.collapsible-subcategories-list .collapsible-subcategories-list a:hover {
	background-color: var(--brand-color-highlight);
}

/*
	DROPDOWN MENU
 */

.potiskarium-dropdown-menu,
.potiskarium-dropdown-menu .dropdown-menu-checkbox {
	display: none;
}

.potiskarium-dropdown-menu .potiskarium-dropdown-menu-button {
	display: flex;
	align-items: center;
}

.potiskarium-dropdown-menu .dropdown-menu-checkbox-label,
.potiskarium-dropdown-menu .dropdown-menu-checkbox-label-close {
	display: inline-block;
	background-image: url('img/menu.svg');
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 5px;
}

.potiskarium-dropdown-menu .potiskarium-dropdown-menu-header {
	padding: 10px;
}

.potiskarium-dropdown-menu .dropdown-menu-checkbox-label-close {
	background-image: url('img/close.svg');
}

.potiskarium-dropdown-menu .potiskarium-dropdown-menu-content {
	position: fixed;
	z-index: 999999;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	padding: 10px;
	background-color: var(--brand-color);
	overflow: auto;
	transform: translateX(-100%);
	transition: transform 0.5s ease;
}

.potiskarium-dropdown-menu .dropdown-menu-checkbox:checked + .potiskarium-dropdown-menu-content {
	transform: translateX(0);
}

/*
	SLIDER
 */

.product-categories-slider {
	display: flex;
	flex-direction: row;
	align-items: center;
	flex-wrap: nowrap;
}

.product-categories-slider .product-categories-slider-view {
	overflow: hidden;
	flex-grow: 1;
	margin-left: 10px;
	margin-right: 10px;
}

.product-categories-slider .product-categories-slider-content {
	display: flex;
	flex-direction: row;
	align-items: center;
	flex-wrap: nowrap;
}

.product-categories-slider-content .product-category-item {
	position: relative;
	text-decoration: none;
	width: 400px;
	height: 400px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.product-categories-slider-content .product-category-item .product-category-label {
	user-select: none;
	-moz-user-select: none;
	-webkit-user-select: none;
	color: white;
	text-align: center;
	padding: 10px;
	margin: 1rem;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background-color: var(--brand-color);
}


.product-categories-slider-content .product-category-item:hover .product-category-label {
	margin-top: 0.8rem;
}

.product-categories-slider-view .product-category-item .product-category-label h4 {
	color: white;
	padding: 0;
	margin: 0;
}

.product-categories-slider .slider-left-arrow,
.product-categories-slider .slider-right-arrow {
	background-color: var(--brand-color);
	border-radius: 50%;
	cursor: pointer;
}

.product-categories-slider .slider-left-arrow:hover,
.product-categories-slider .slider-right-arrow:hover {
	margin-top: -5px;
}

.product-categories-slider .slider-left-arrow .arrow-image,
.product-categories-slider .slider-right-arrow .arrow-image {
	width: 50px;
	height: 50px;
	background-position: center;
	background-repeat: no-repeat;
}

.product-categories-slider .slider-left-arrow.hidden,
.product-categories-slider .slider-right-arrow.hidden {
	display: none;
}

.product-categories-slider .slider-left-arrow .arrow-image {
	background-image: url('img/chevron-left.svg');
}

.product-categories-slider .slider-right-arrow .arrow-image {
	background-image: url('img/chevron-right.svg');
}

/*
	RESPONSIVENESS
 */

/* Medium devices */
@media (max-width: 1000px) {

	.collapsible-categories-menu {
		width: auto !important;
	}
}

/* Small devices */
@media (max-width: 768.98px) {

	.hide-on-mobile {
		display: none;
	}

	.potiskarium-logo {
		padding: 0 40px;
	}

	.potiskarium-dropdown-menu {
		display: block;
	}

	header {
		position: sticky;
		top: 0;
		left: 0;
		right: 0;
		z-index: 9999;
	}

	.has-global-padding {
		padding-right: 15px !important;
		padding-left: 15px !important;
	}

	.woocommerce div.product div.images {
		margin-bottom: 0;
	}

	.wp-block-comgate-plugin-footer-logos-block {
		padding-top: 20px;
	}

	.product-categories-slider .slider-left-arrow,
	.product-categories-slider .slider-right-arrow {
		border-radius: 5px;
	}

	.product-categories-slider .slider-left-arrow .arrow-image,
	.product-categories-slider .slider-right-arrow .arrow-image {
		width: 30px;
		height: 150px;
	}
}
