/* Mobile / responsive layer for foto123 */

/* Content images only — never configurator / crop / frame sprites */
.page img,
.bxslider img,
.block img,
.content-block img,
.text img,
.logo img {
	max-width: 100%;
	height: auto;
}

.picture img,
.nuotrauka img,
#image,
.remas img,
.wallpic img,
.krastas-vertical img,
.krastas-horizontal img,
.mirror img,
.border-img,
.mirror-top img,
.mirror-left img,
.mirror-right img,
.mirror-bottom img,
.punktas img,
.infoico {
	max-width: none !important;
	height: auto;
}

.punktas img,
.infoico {
	height: auto;
	width: auto;
}

@media (max-width: 1000px) {
	.wrap {
		width: auto;
		max-width: 1200px;
		margin: 0 15px;
		box-sizing: border-box;
	}

	.page.wrap.footer,
	.page.wrap {
		margin-left: 15px;
		margin-right: 15px;
		width: auto;
	}

	.wrap2 {
		margin: 0 15px;
	}

	.boxes li {
		width: 48%;
		margin-left: 2%;
		box-sizing: border-box;
	}

	.boxes li:nth-child(odd) {
		margin-left: 0;
	}

	.left-side,
	.canvas,
	.right-side {
		float: none;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	/* Keep picture stage centered but do not force image stretch */
	.picture,
	.nuotrauka {
		float: none;
		margin: 0 auto;
		max-width: 100%;
	}

	.left-side {
		margin-bottom: 20px;
	}

	.right-side {
		margin-top: 20px;
	}

	.infobox {
		width: auto;
		max-width: 100%;
		left: 0 !important;
		right: 0;
		box-sizing: border-box;
	}

	.groups {
		width: auto;
		min-width: 22%;
		margin-bottom: 8px;
		box-sizing: border-box;
	}

	.content-block,
	.page .w100,
	.page .w50,
	.page .w33 {
		width: 100% !important;
		float: none !important;
		margin-left: 0 !important;
		box-sizing: border-box;
	}

	.half {
		width: 100%;
		margin-left: 0;
		float: none;
	}

}

@media (max-width: 760px) {
	.header {
		margin-bottom: var(--s-4);
	}

	.header-top {
		padding: var(--s-2) 0;
		flex-wrap: wrap;
		gap: var(--s-3);
	}

	.logo img {
		max-height: 40px;
		width: auto;
	}

	.logo { order: 1; }

	.nav-toggle {
		display: block;
		order: 3;
	}

	/* Cart stays visible on phones, next to the menu button */
	.header-contacts {
		order: 2;
		flex: 0 0 auto;
		margin-left: auto;
		gap: var(--s-1);
	}

	.header-help,
	.header-fb { display: none; }

	.header-cart {
		padding: 0 var(--s-3);
		min-height: 44px;
	}

	.header-cart-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.nav-help {
		display: block;
		margin-top: var(--s-3);
		padding: var(--s-3) var(--s-4) 0;
		border-top: 1px solid var(--c-line);
		font-size: var(--fs-sm);
		line-height: 1.5;
		color: var(--c-muted);
	}

	.nav-help a { color: var(--c-ink); font-weight: 600; }

	.main-nav {
		display: none;
		padding: 0 0 var(--s-3);
		max-height: calc(100vh - 72px);
		overflow-y: auto;
	}

	.nav-open .main-nav { display: block; }

	.nav {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.nav a {
		padding: var(--s-3) var(--s-4);
		font-size: var(--fs-base);
		border-radius: var(--radius-sm);
	}

	.submenu {
		justify-content: flex-start;
		padding: var(--s-2) 0 0;
		border-top: 1px solid var(--c-line);
		margin-top: var(--s-2);
	}

	.submenu a {
		display: block;
		width: 100%;
		padding: 10px var(--s-4);
		border-radius: var(--radius-sm);
	}

	.page.wrap.footer,
	.page.wrap {
		padding: 16px;
		border-radius: 16px;
		margin-left: 10px;
		margin-right: 10px;
	}

	.boxes li {
		width: 100% !important;
		margin-left: 0 !important;
		float: none;
	}

	.groups {
		float: none;
		display: block;
		width: 100%;
		margin: 0 0 6px;
		padding: 10px 12px;
		min-width: 0;
	}

	.grouplist {
		height: auto !important;
		min-height: 0;
		overflow: visible;
		padding-bottom: 10px;
	}

	.grouplist .size,
	.size.punktas {
		float: none;
		display: inline-flex;
		align-items: center;
		margin: 0 12px 10px 0;
		white-space: nowrap;
		vertical-align: middle;
	}

	.left-side h3 {
		margin-top: 16px;
		clear: both;
	}

	.punktas {
		display: block;
		margin-bottom: 6px;
		line-height: 1.4;
	}

	h1 {
		font-size: 24px;
		padding-bottom: 12px;
	}

	.text img {
		max-width: 100%;
		height: auto;
	}

	.page table.w100,
	.page table {
		display: block;
		overflow-x: auto;
	}
}

@media (max-width: 480px) {
	.wrap {
		margin: 0 10px;
	}

	.logo img {
		max-height: 40px;
	}

	.nice-button,
	.submit {
		width: 100%;
		box-sizing: border-box;
		text-align: center;
	}
}
