/**
 * Shared layout rules for veselka and cafe themes.
 */

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}

/* Sticky footer — flexbox */
html {
	height: 100%;
}

body {
	min-height: 100%;
	display: flex;
	flex-direction: column;
}

#wrap {
	flex: 1 0 auto;
	width: 100%;
	min-height: 0;
	margin-bottom: 0;
	padding-bottom: 0;
	height: auto !important;
}

#footer {
	flex-shrink: 0;
	width: 100%;
	height: auto;
	align-self: stretch;
}

#logo,
#site-title,
#phone-txt,
#phone,
#email {
	text-align: center;
	display: block;
}

#logo img,
#phone img,
#email img {
	float: none;
	margin-left: auto;
	margin-right: auto;
}

#site-title,
#phone-txt {
	display: block;
	font-size: 24px;
	line-height: 24px;
	margin-top: 0;
}

#phone img {
	margin-top: 24px;
}

#email img {
	margin-top: 20px;
}

#pills-menu {
	margin-top: 0;
	display: table;
	float: none;
	margin-left: auto;
	margin-right: auto;
}

@media (min-width: 768px) {
	#site-title,
	#phone-txt {
		text-align: right;
		font-size: 16px;
		line-height: 16px;
		margin-top: 16px;
	}

	#phone img {
		margin-top: 4px;
		float: right;
	}

	#email img {
		margin-top: 0;
		float: right;
	}

	#pills-menu {
		margin-top: 0;
		display: table;
		float: none;
		margin-left: auto;
		margin-right: auto;
	}
}

@media (min-width: 992px) {
	#site-title,
	#phone-txt {
		text-align: right;
	}

	#phone {
		margin-top: 0;
		text-align: right;
	}

	#pills-menu {
		margin-top: 0;
		float: right;
	}
}

@media (min-width: 1200px) {
	#pills-menu {
		margin-top: 0;
		float: right;
	}

	#site-title,
	#phone-txt {
		font-size: 20px;
		line-height: 20px;
		margin-top: 20px;
	}
}

.breadcrumb {
	margin-top: 20px;
}

.divider {
	color: #999;
	margin-left: 5px;
	margin-right: 5px;
}

.divider:before,
.divider:after {
	content: " ";
}

aside ul {
	margin-bottom: 0;
	padding-left: 0;
	list-style: none;
}

aside ul:before,
aside ul:after {
	content: " ";
	display: table;
}

aside ul:after {
	clear: both;
}

aside ul > li {
	position: relative;
	display: block;
}

aside ul > li > a {
	position: relative;
	display: block;
}

aside ul > li > a:hover,
aside ul > li > a:focus {
	text-decoration: none;
	background-color: #eeeeee;
}

aside ul > .children {
	margin-left: 10px;
}

.widget {
	margin-top: 25px;
}

.widget_nav_menu {
	padding-left: 15px;
	padding-right: 15px;
}

.banner {
	margin-top: 50px;
	padding-left: 15px;
	padding-right: 15px;
}

.banner h3 {
	font-size: 20px;
}

.carousel {
	margin-bottom: 60px;
}

.carousel-caption {
	z-index: 10;
	padding-bottom: 10px;
	padding-top: 10px;
	margin-bottom: 5px;
}

.carousel-indicators {
	bottom: 0;
	margin-bottom: 0;
}

.carousel-inner > .carousel-item img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	width: auto;
	height: auto;
}

.carousel-item {
	position: relative;
}

.img-wrap {
	margin-top: 40px;
	margin-bottom: 10px;
	text-align: center;
}

.marketing .col-md-4,
.marketing .col-sm-4,
.marketing .col-4 {
	text-align: center;
}

.marketing h2 {
	font-weight: normal;
	margin-top: 10px;
	line-height: 18px;
}

/* --- BS3 components (card-style thumbs, full-width buttons) --- */
.thumbnail {
	display: block;
	padding: 4px;
	margin-bottom: 20px;
	line-height: 1.42857143;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	transition: border 0.2s ease-in-out;
}

.thumbnail > img,
.thumbnail a > img,
.thumbnail > a > img,
a.thumbnail > img {
	display: block;
	max-width: 100%;
	height: auto;
	margin-left: auto;
	margin-right: auto;
}

.thumbnail .caption {
	padding: 9px;
	color: #333;
}

a.thumbnail:hover,
a.thumbnail:focus {
	border-color: #666;
}

a.thumbnail:focus,
a.thumbnail:active {
	border-color: #ddd;
}

.img-thumbnail {
	padding: 4px;
	line-height: 1.42857143;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	max-width: 100%;
	height: auto;
}

.center-block {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.btn-block,
a.btn.btn-block,
.btn.btn-block {
	display: block;
	width: 100%;
}

.text-right {
	text-align: right !important;
}

.marketing .img-wrap img,
.img-wrap img.img-thumbnail {
	max-width: 100%;
	width: auto;
	height: auto;
}

/* --- WP gallery (cafe menu etc.) --- */
.gallery {
	margin-bottom: 15px;
}

.gallery .gallery-row {
	margin-left: -15px;
	margin-right: -15px;
}

.gallery .gallery-row > [class*="col-"] {
	padding-left: 15px;
	padding-right: 15px;
	margin-bottom: 15px;
}

.gallery a {
	display: block;
	line-height: 0;
}

.gallery img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

@media (max-width: 575.98px) {
	.gallery .gallery-row {
		margin-left: 0;
		margin-right: 0;
	}

	.gallery .gallery-row > [class*="col-"] {
		padding-left: 0;
		padding-right: 0;
	}
}

@media (min-width: 576px) {
	.gallery .gallery-row > .col-sm-6:not([class*="col-md-"]) {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

/* --- Legacy post content grid (DB markup uses col-md-3/col-sm-4) --- */
.entry-content {
	padding-bottom: 40px;
}

.entry-content .row {
	display: flex;
	flex-wrap: wrap;
	margin-left: -15px;
	margin-right: -15px;
}

.entry-content .row > [class*="col-"] {
	position: relative;
	min-height: 1px;
	padding-left: 15px;
	padding-right: 15px;
	box-sizing: border-box;
	width: auto;
}

.entry-content .col-12 {
	flex: 0 0 100%;
	max-width: 100%;
	width: 100%;
}

.entry-content .col-6 {
	flex: 0 0 50%;
	max-width: 50%;
}

.entry-content .col-xs-4 {
	flex: 0 0 33.33333333%;
	max-width: 33.33333333%;
}

@media (min-width: 576px) {
	.entry-content .col-4 {
		flex: 0 0 33.33333333%;
		max-width: 33.33333333%;
	}
}

@media (min-width: 768px) {
	.entry-content .col-sm-12 {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.entry-content .col-sm-4 {
		flex: 0 0 33.33333333%;
		max-width: 33.33333333%;
	}

	.entry-content .col-sm-6 {
		flex: 0 0 50%;
		max-width: 50%;
	}

	.entry-content .col-sm-8 {
		flex: 0 0 66.66666667%;
		max-width: 66.66666667%;
	}
}

@media (min-width: 992px) {
	.entry-content .col-md-3 {
		flex: 0 0 25%;
		max-width: 25%;
	}

	.entry-content .col-md-4 {
		flex: 0 0 33.33333333%;
		max-width: 33.33333333%;
	}

	.entry-content .col-md-6 {
		flex: 0 0 50%;
		max-width: 50%;
	}

	.entry-content .col-md-8 {
		flex: 0 0 66.66666667%;
		max-width: 66.66666667%;
	}

	.entry-content .col-md-9 {
		flex: 0 0 75%;
		max-width: 75%;
	}

	.entry-content .col-md-12 {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.entry-content .offset-md-3 {
		margin-left: 25%;
	}
}

@media (max-width: 767.98px) {
	.entry-content .row:not(.curtain-icon-row) > [class*="col-"]:not([class*="col-6"]) {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.entry-content .row > [class*="col-"]:not([class*="col-6"]):not([class*="col-4"]),
	.marketing .row > [class*="col-"]:not([class*="col-6"]) {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

/* Curtains page: certification icons row */
.entry-content .curtain-icon-row {
	display: flex;
	flex-wrap: nowrap;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1rem;
	margin-left: 0;
	margin-right: 0;
}

.entry-content .curtain-icon-row > [class*="col-"] {
	flex: 1 1 0 !important;
	min-width: 0;
	max-width: none !important;
	width: auto !important;
	padding-left: 5px;
	padding-right: 5px;
}

.entry-content .curtain-icon-row img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

/* Product catalog cards (#products) — square thumb box shared with .thumbnail > a below */
.entry-content #products > .w-100[aria-hidden="true"] {
	flex: 0 0 100%;
	width: 100%;
	height: 0;
	padding: 0;
	margin: 0;
	overflow: hidden;
	border: 0;
}

/* Catalog thumbs — production-style square JPEG, responsive width (no object-fit box). */
.entry-content .thumbnail > a,
.entry-content a.thumbnail {
	display: block;
	line-height: 0;
}

.entry-content .thumbnail > a > img,
.entry-content .thumbnail > a > img.img-fluid,
.entry-content .thumbnail > a > img.img-thumbnail,
.entry-content #products .thumbnail img,
.entry-content #products .thumbnail img.img-fluid,
.entry-content a.thumbnail > img,
.entry-content a.thumbnail > img.img-fluid,
.entry-content a.thumbnail > img.img-thumbnail {
	width: 100%;
	height: auto;
	max-width: 100%;
	display: block;
}

/* Mebel etc.: img-thumbnail inside .thumbnail = double border; match #products */
.entry-content .thumbnail img.img-thumbnail {
	padding: 0;
	border: 0;
	background-color: transparent;
	border-radius: 0;
	box-shadow: none;
}

/*
 * Catalog grid (col-md-4 col-sm-6 col-6 in DB): phone 1 col, tablet 2, desktop 3.
 * Unqualified col-6 alone would force 2 cols on mobile — override here.
 */
@media (max-width: 575.98px) {
	.entry-content .row > .col-md-4.col-sm-6 {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

@media (min-width: 576px) and (max-width: 991.98px) {
	.entry-content .row > .col-md-4.col-sm-6 {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

/*
 * Photo grid (portfolio / textile: col-md-3 col-sm-4 col-6 img-wrap).
 * Phone 1, tablet 2, tablet landscape 3, desktop 4.
 */
.entry-content .row > .col-md-3.col-sm-4.img-wrap {
	margin-bottom: 1.25rem;
}

.entry-content .img-wrap > a {
	display: block;
	line-height: 0;
	margin-left: auto;
	margin-right: auto;
	max-width: 100%;
}

.entry-content .img-wrap > a > img,
.entry-content .img-wrap img.img-thumbnail,
.entry-content .img-wrap > a > img.img-fluid,
.entry-content .img-wrap img.img-thumbnail.img-fluid {
	width: 100%;
	height: auto;
	max-width: 100%;
	display: block;
	padding: 0;
}

@media (max-width: 575.98px) {
	.entry-content .row > .col-md-3.col-sm-4.img-wrap {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

@media (min-width: 576px) and (max-width: 767.98px) {
	.entry-content .row > .col-md-3.col-sm-4.img-wrap {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

@media (min-width: 768px) and (max-width: 991.98px) {
	.entry-content .row > .col-md-3.col-sm-4.img-wrap {
		flex: 0 0 33.33333333%;
		max-width: 33.33333333%;
	}
}

@media (min-width: 992px) {
	.entry-content .row > .col-md-3.col-sm-4.img-wrap {
		flex: 0 0 25%;
		max-width: 25%;
		padding-left: 14px;
		padding-right: 14px;
	}

	.entry-content .img-wrap > a {
		max-width: 92%;
	}
}

@media (max-width: 767.98px) {
	.entry-content #products.row {
		margin-left: -8px;
		margin-right: -8px;
	}

	.entry-content #products > [class*="col-"] {
		padding-left: 8px;
		padding-right: 8px;
	}

	.entry-content #products .thumbnail {
		padding: 2px;
	}
}

#copywrites,
#contacts,
#veselka {
	float: none;
	text-align: center;
}

@media (min-width: 768px) {
	#veselka {
		margin-top: 0;
	}
}
