/*
 * style dla urządzeń mobilnych
 *
 * Wymaga w <head> index.php:
 *   <meta name="viewport" content="width=device-width, initial-scale=1">
 *   <link rel="stylesheet" type="text/css" href="mobile.css">
 *
 * Selektory mają prefiks "html body", żeby wygrywały ze stylami
 * wpisanymi inline w <style> w index.php i w plikach view/*.php
 * (które w dokumencie są później niż ten plik).
 */

/* ------------------------------------------------------------------ */
/* Kasujemy stare "powiększenie" z index.php (24px dla <=1000px)       */
/* ------------------------------------------------------------------ */
@media (max-width: 1000px)
{
	html body
	{
		font-size: 15px;
	}
	html body #top
	{
		font-size: 14px;
		line-height: 30px;
	}
	html body #footer
	{
		font-size: 14px;
		padding-top: 30px;
		padding-bottom: 30px;
	}
}

/* ------------------------------------------------------------------ */
/* Układ mobilny                                                       */
/* ------------------------------------------------------------------ */
@media (max-width: 900px)
{
	html body
	{
		-webkit-text-size-adjust: 100%;
		overflow-x: hidden;
	}
	html body img
	{
		max-width: 100%;
	}
	html body h1
	{
		font-size: 24px;
		line-height: 1.3;
	}
	html body h2
	{
		font-size: 19px;
	}

	/* --- górny pasek --- */
	html body #top .wrap
	{
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		padding: 4px 6px;
	}
	html body #top_l,
	html body #top_r
	{
		flex-wrap: wrap;
		justify-content: center;
	}
	html body #top a,
	html body #top a.r
	{
		float: none;
		padding: 6px 8px;
		line-height: 20px;
	}
	html body #lang_menu
	{
		float: none;
		order: 99;
		margin-left: 6px;
		position: relative;
	}
	html body #cur_lang
	{
		width: 30px;
	}
	html body #lang_drop
	{
		right: 0;
		margin-left: 0;
	}

	/* --- menu boczne -> blok nad treścią --- */
	html body #content
	{
		padding: 0 10px 30px;
		box-sizing: border-box;
	}
	html body #main
	{
		float: none;
		width: auto;
	}
	html body #search_top
	{
		margin-bottom: 20px;
	}
	html body #search_top input,
	html body #search_top button
	{
		height: 46px;
		font-size: 16px;
	}
	html body #menu
	{
		float: none;
		width: auto;
		padding-bottom: 10px;
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 6px;
	}
	html body #logo
	{
		flex-basis: 100%;
		padding: 10px 0 0;
		text-align: center;
	}
	html body #logo img
	{
		height: 90px;
	}
	html body #basket
	{
		flex: 1;
		width: auto;
		min-height: 52px;
		margin-bottom: 0;
		padding-top: 8px;
		padding-bottom: 8px;
		box-sizing: border-box;
	}
	html body #basket span
	{
		display: inline;
		flex-basis: auto;
		padding: 0 0 0 6px;
	}

	/* --- menu "hamburger": przycisk obok koszyka, kategorie po kliknięciu --- */
	html body #menu_toggle
	{
		display: flex;
		align-items: center;
		gap: 10px;
		height: 52px;
		padding: 0 14px;
		background-color: #ffffff;
		color: #1a1a1a;
		border: 2px solid #1a1a1a;
		font-family: 'JetBrains Mono', Consolas, monospace;
		font-size: 12px;
		font-weight: 700;
		text-transform: uppercase;
		cursor: pointer;
	}
	html body #menu_toggle span,
	html body #menu_toggle span:before,
	html body #menu_toggle span:after
	{
		display: block;
		width: 20px;
		height: 2px;
		background-color: #1a1a1a;
		position: relative;
		transition: transform .15s, background-color .15s;
	}
	html body #menu_toggle span:before,
	html body #menu_toggle span:after
	{
		content: '';
		position: absolute;
		left: 0;
	}
	html body #menu_toggle span:before
	{
		top: -6px;
	}
	html body #menu_toggle span:after
	{
		top: 6px;
	}
	html body #menu.open #menu_toggle
	{
		background-color: #1a1a1a;
		color: #ffffff;
	}
	html body #menu.open #menu_toggle span
	{
		background-color: transparent;
	}
	html body #menu.open #menu_toggle span:before
	{
		top: 0;
		background-color: #ffffff;
		transform: rotate(45deg);
	}
	html body #menu.open #menu_toggle span:after
	{
		top: 0;
		background-color: #ffffff;
		transform: rotate(-45deg);
	}
	html body #cats,
	html body #socials
	{
		display: none;
	}
	html body #menu.open #cats
	{
		display: block;
		flex-basis: 100%;
		margin-top: 4px;
		border: 2px solid #1a1a1a;
		box-sizing: border-box;
	}
	html body #menu a.sub
	{
		font-size: 15px;
		padding-top: 9px;
		padding-bottom: 9px;
	}
	html body #menu.open #socials
	{
		display: flex;
		flex-basis: 100%;
		justify-content: center;
		margin-top: 10px;
	}
	html body #socials a
	{
		width: 42px;
		height: 42px;
	}

	/* --- kontenery treści --- */
	html body #page,
	html body #page1,
	html body #page2,
	html body #page3
	{
		float: none;
		width: auto !important;
		padding: 10px 0;
		box-sizing: border-box;
		line-height: 160%;
	}
	html body #page2 h1,
	html body #page3 h1
	{
		margin-bottom: 20px;
	}

	/* --- lista produktów (kafelki 2 w rzędzie) --- */
	html body #cat_head
	{
		flex-direction: column;
		align-items: flex-start;
		margin-bottom: 20px;
	}
	html body #cat_head h1
	{
		font-size: 32px;
	}
	html body .outline
	{
		-webkit-text-stroke-width: 1.5px;
	}
	html body #cat_pager a
	{
		padding: 8px 12px;
		font-size: 13px;
	}
	html body #no_products
	{
		font-size: 20px;
		padding-top: 60px;
		padding-bottom: 60px;
	}
	html body #filters
	{
		flex-wrap: wrap;
		margin: 0 0 14px;
	}
	html body #filters select
	{
		padding: 6px;
		max-width: 60%;
	}
	html body #items
	{
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
	html body .item
	{
		padding: 8px;
	}
	html body .item:hover
	{
		transform: none;
		box-shadow: none;
	}
	html body .item .im
	{
		height: auto;
		padding-bottom: 100%;
	}
	html body .item .name
	{
		font-size: 13px;
		margin: 10px 0 6px;
	}
	html body .item .tag
	{
		font-size: 10px;
		padding: 2px 5px;
	}
	html body .item .pr
	{
		font-size: 13px;
	}
	html body .quick_cart
	{
		width: 36px;
		height: 36px;
	}

	/* --- aktualności --- */
	html body .news
	{
		padding: 0 12px 12px;
	}
	html body .news h2
	{
		font-size: 18px;
		padding-top: 12px;
	}
	html body .news img
	{
		position: static;
		float: left;
		width: 80px;
		margin: 4px 12px 6px 0;
	}
	html body .news_photo .news_txt
	{
		padding-left: 0;
	}
	html body .news_txt
	{
		min-height: 0;
		overflow: hidden;
	}

	/* --- karta produktu --- */
	html body #big
	{
		float: none;
		display: block;
		width: 100%;
		margin: 0 0 15px;
	}
	html body #item_right
	{
		float: none;
		width: auto;
	}
	html body #page1 h1
	{
		margin-bottom: 15px;
	}
	html body #txt
	{
		min-height: 0;
		padding-bottom: 20px;
	}
	html body #txt img,
	html body #txt iframe,
	html body #txt table
	{
		max-width: 100%;
	}
	html body #price_cart
	{
		display: block;
		text-align: center;
	}
	html body #price
	{
		display: block;
		margin: 0 0 12px;
	}
	html body #cart,
	html body #btn_soon
	{
		width: 100%;
		padding: 14px 20px;
	}
	html body #item_shutdown img
	{
		height: 80px;
		opacity: 0.4;
	}
	html body #notes_wrap
	{
		margin-bottom: 20px;
		color: black;
	}
	html body #notify_email
	{
		display: flex;
	}
	html body #notify_email input
	{
		flex: 1;
		min-width: 0;
	}
	html body .thumbs
	{
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
	}
	html body .thumbs .img
	{
		width: calc(33.333% - 4px);
		margin: 0;
	}
	html body #zoom
	{
		top: 10px;
		left: 10px;
		right: 10px;
		bottom: 10px;
	}
	html body #zoom span
	{
		width: 40px;
		top: 50px;
		background-color: rgba(255, 255, 255, 0.6);
		background-size: 28px auto;
	}

	/* --- wyszukiwarka: używane jest pole #search_top nad treścią --- */

	/* --- formularze: logowanie, rejestracja, kontakt, konto --- */
	html body #page_form
	{
		width: auto;
		padding-top: 10px;
		flex-basis: 100%;
	}
	html body #form_logo
	{
		height: 90px;
	}
	html body #form label
	{
		display: block;
		width: auto;
		margin-bottom: 3px;
	}
	html body #form input,
	html body #form select,
	html body #form textarea
	{
		width: 100%;
		box-sizing: border-box;
		font-size: 16px;
		padding: 8px 10px;
	}
	html body #form input[type=checkbox]
	{
		width: auto;
		margin-left: 0;
		vertical-align: top;
	}
	html body #form input[name=cap]
	{
		width: 120px;
	}
	html body #form span
	{
		width: calc(100% - 30px);
	}
	html body #form button
	{
		width: 100%;
		padding: 0 12px;
	}
	html body #form_wrap,
	html body #form_bottom
	{
		padding: 10px 12px;
	}

	/* --- formularze zamówienia (krok 1/2) --- */
	html body .form_std
	{
		width: auto;
		padding-bottom: 20px;
	}
	html body .form_std label.lab
	{
		display: block;
		width: auto;
		margin-bottom: 3px;
	}
	html body .form_std input[type=text],
	html body .form_std input[type=password],
	html body .form_std select
	{
		width: 100%;
		box-sizing: border-box;
		font-size: 16px;
		padding: 8px 10px;
	}
	html body .form_std input[name=inpost],
	html body .form_std input[name=orlen]
	{
		width: calc(100% - 96px);
		vertical-align: top;
	}
	html body .btn_inpost,
	html body .orlen-widget
	{
		height: 38px;
		vertical-align: top;
		padding: 0;
		margin-left: 2px;
	}
	html body .lab_sm
	{
		display: block;
	}
	html body .form_std_bottom
	{
		text-align: center;
	}
	html body .form_std_bottom .btn2
	{
		width: 100%;
		height: auto;
		line-height: 1.4;
		padding: 12px 15px;
	}
	html body #pop_inpost,
	html body #pop_orlen.ok
	{
		left: 5px;
		top: 5px;
		right: 5px;
		bottom: 5px;
		padding: 10px;
		border-radius: 0;
	}
	html body #close_inpost
	{
		right: 0;
		top: 0;
		z-index: 5;
	}
	html body .orlen-widget--normal .orlen-widget-map
	{
		width: 100%;
	}

	/* --- tabele: koszyk, potwierdzenie, zamówienia --- */
	html body table
	{
		font-size: 13px;
	}
	html body th,
	html body td
	{
		padding: 5px 4px;
		width: auto !important;
		word-break: break-word;
	}
	html body .b_thumb
	{
		height: 40px;
		max-width: 50px;
	}
	html body table select
	{
		padding: 4px;
	}
	html body .options_box,
	html body .summary,
	html body .summary2
	{
		float: none;
		width: 100%;
		margin-right: 0;
		padding: 15px;
		box-sizing: border-box;
	}
	html body .options_box:first-child
	{
		margin-right: 0;
	}
	html body .options_box label
	{
		display: block;
		padding: 4px 0;
	}
	html body #list_country
	{
		max-width: 100%;
		width: 100%;
		padding: 6px;
	}
	html body #basket_summary .btn2,
	html body #final_step .btn2
	{
		width: 100%;
		height: auto;
		line-height: 1.4;
		padding: 12px 15px;
	}
	html body #order_status
	{
		margin-top: 0;
	}

	/* --- podsumowanie zamówienia / płatności --- */
	html body #page3
	{
		word-wrap: break-word;
	}
	html body #page3 .btn2
	{
		height: auto;
		line-height: 1.4;
		padding: 12px 20px;
	}
	html body #bank_det
	{
		padding-left: 15px;
	}

	/* --- download --- */
	html body .down
	{
		padding-left: 12px;
		padding-right: 12px;
	}
	html body .down_img
	{
		position: static;
		float: left;
		width: 70px;
		height: 70px;
		margin: 10px 10px 5px 0;
	}
	html body .down table
	{
		width: 100%;
		clear: both;
	}

	/* --- stopka --- */
	html body #footer
	{
		padding: 20px 10px;
	}
	html body #footer .wrap
	{
		flex-direction: column;
		min-height: 0;
		text-align: center;
	}
	html body #footer_links
	{
		justify-content: center;
		gap: 4px 10px;
	}
	html body #footer a
	{
		display: inline-block;
		padding: 4px 8px;
	}

	/* --- komunikaty / okienka --- */
	html body #added_to_cart_top
	{
		left: 10px;
		right: 10px;
		width: auto;
		margin-left: 0;
	}
	html body #infobox
	{
		left: 10px;
		right: 10px;
		width: auto;
		margin-left: 0;
		top: 20px;
		max-height: calc(100% - 40px);
		overflow-y: auto;
	}
	html body #cookie_pop
	{
		padding: 15px 65px 15px 15px;
		font-size: 13px;
		z-index: 900;
	}
	html body #cookie_pop span
	{
		top: 12px;
		right: 12px;
	}
	html body #lang_pop
	{
		position: fixed;
		top: 120px;
		z-index: 991;
	}
}
