@font-face {
	font-family: Nunito;
	src: url("./fonts/Nunito-Regular.ttf");
}

@font-face {
	font-family: Nunito;
	src: url("./fonts/Nunito-Bold.ttf");
	font-weight: bold;
}

@font-face {
	font-family: Nunito;
	src: url("./fonts/Nunito-Italic.ttf");
	font-style: italic;
}

@font-face {
	font-family: Nunito;
	src: url("./fonts/Nunito-BoldItalic.ttf");
	font-style: italic;
	font-weight: bold;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: "Nunito", Courier, monospace;
}

html,
body {
	height: 100%;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;

	background-image: url("./img/elements/Texture0407.gif");
	background-repeat: repeat;
	background-size: auto;
	background-color: #f4f4f4;
	color: #333;
	line-height: 1.6;
}

body > #container {
	flex: 1;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1;
}

#container {
	min-width: 60%;
	margin: 0 auto;
	padding: 0 1rem;
	max-width: 90%;
	word-wrap: break-word;
	overflow-wrap: break-word;
	line-height: 1.6;
}

@media screen and (max-width: 850px) {
	#container {
		max-width: 100%;
	}
}

/* .header-banner { */
/* width: 100%; /*
/* min-height: 300px; */
/* background-size: cover; */
/* background-position: center; */
/* background-repeat: no-repeat; */
/* background-image: url("./img/elements/linijka_2.webp"); */
/* } */

.header-strip {
	background-color: #406a8d;
	color: #ffffff;
	text-align: center;
	padding: 0.3rem;
	font-size: 1.6rem;
	border-bottom: 4px solid #1acd9a;
}

.header-strip h1 {
	margin: 0;
}

@media screen and (max-width: 850px) {
	.header-banner {
		display: none;
	}
}

#navbar {
	min-height: 50px;
	background-color: #13092d;
	display: flex;
	align-items: center;
	justify-content: center;
	border-top: 4px solid #1acd9a;
}

#navbar ul {
	display: flex;
	gap: 5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

#navbar li a {
	text-decoration: none;
	color: #aaa;
	font-weight: bold;
}

#navbar li a:hover {
	color: #fff;
	background-color: #333;
	border-radius: 4px;
}

@media screen and (max-width: 850px) {
	#navbar ul {
		gap: 1rem;
	}
}

@media screen and (max-width: 400px) {
	#navbar ul {
		flex-direction: column;
		gap: 0.5rem;
	}

	#header {
		height: 200px;
	}
}

#navbar a.active {
	color: white;
	background-color: #23436e;
	border-radius: 4px;
	padding: 0.3rem 0.5rem;
}

#info-stripe {
	background-color: #2c3e50;
	color: #ecf0f1;
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-family: "VT323", monospace;
}

#info-stripe button {
	background: none;
	border: none;
	color: #ecf0f1;
	font-size: 1.2rem;
	cursor: pointer;
	padding: 0;
	margin-left: 1rem;
}

#info-stripe button:hover {
	color: #e74c3c;
}

.container {
	background-color: #fff;
	max-width: 1400px;
	margin: 20px auto;
	padding: 20px;
}

.products-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin-top: 20px;
}

@media screen and (max-width: 850px) {
	.products-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media screen and (max-width: 500px) {
	.products-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.product-card {
	background-color: #fafafa;
	border-radius: 3px;
	overflow: hidden;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s;
}

.product-card:hover {
	transform: scale(1.03);
}

.product-image {
	width: 100%;
	height: 200px;
	background-color: #f0f0f0;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
}

.product-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.product-title {
	width: 100%;
	font-size: 16px;
	margin-bottom: 0.5rem;
	text-align: center;
}

.product-info {
	padding: 2px;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
}

.product-price {
	order: 1;
}

/* Available coloring */

.status-available,
.status-unavailable,
.status-unknown {
	order: 2;
	white-space: nowrap;
}

.status-unavailable {
	color: red;
	font-weight: bold;
}

.status-available {
	color: green;
	font-weight: bold;
}

.status-unknown {
	color: gray;
	font-style: italic;
}

button {
	background-color: #007bff;
	color: #fff;
	border: none;
	padding: 10px 15px;
	border-radius: 3px;
	cursor: pointer;
	transition: background-color 0.3s;
	font-size: 14px;
}

button:hover {
	background-color: #0056b3;
}

.loading,
.error {
	text-align: center;
	padding: 20px;
	font-size: 16px;
}

.error {
	color: #d9534f;
}

/* Filter */

.filter-sidebar {
	position: fixed;
	top: 100px;
	left: 20px;
	z-index: 200;
	background-color: #ffffff;
	border: 2px solid #ccc;
	padding: 1rem;
	box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-sidebar label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.95rem;
	color: #333;
}

#type-filter {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-color: #fff;
	color: #333;
	font-size: 1rem;
	padding: 0.5rem 1.5rem 0.5rem 0.5rem;
	border: 2px solid #3498db;
	border-radius: 6px;
	cursor: pointer;
	box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
	margin-bottom: 1.5rem;
}

/* Optional: style the dropdown arrow */
#type-filter {
	background-repeat: no-repeat;
	background-position: right 0.5rem center;
	background-size: 10px 6px;
}

/* On focus */
#type-filter:focus {
	outline: none;
	border-color: #3498db;
	box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

/* Toggle buttons */

.toggle-cart-btn,
.toggle-filter-btn {
	position: fixed;
	top: 95%;
	transform: translateY(-50%);
	padding: 0.75rem;
	font-size: 1.2rem;
	background: #3d3d3d;
	color: white;
	border: none;
	border-radius: 0 8px 8px 0;
	cursor: pointer;
	z-index: 999;
	box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

.toggle-cart-btn {
	right: 0;
	border-radius: 8px 0 0 8px;
}

.toggle-filter-btn {
	left: 0;
}

.hidden {
	display: none !important;
}

/* Pagination */

.pagination {
	text-align: center;
	margin-top: 2rem;
}

.pagination button {
	margin: 0 0.25rem;
	padding: 0.5rem 0.8rem;
	border: none;
	border-radius: 4px;
	background: #3498db;
	color: white;
	font-size: 1rem;
	cursor: pointer;
}

.pagination button.active {
	background-color: #2ecc71;
}

.pagination button:hover {
	background-color: #2980b9;
}

/* Modal */

.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	justify-content: center;
	align-items: center;
	padding: 1rem;
	overflow: hidden;
}

.modal-content {
	background-color: #fff;
	margin: 5% auto;
	width: 80%;
	max-height: 90vh;
	max-width: 500px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	animation: fadeIn 0.3s;
	position: relative;
	overflow-y: auto;
	padding: 2rem;
}

.modal-content button {
	margin-top: 1rem;
	background: #2ecc71;
}

.close-button {
	position: absolute;
	right: 20px;
	top: 10px;
	color: #333;
	font-size: 20px;
	font-weight: bold;
	cursor: pointer;
}

.close-button:hover {
	color: #ff0000;
}

.modal-body {
	padding: 20px;
}

.modal-product {
	display: flex;
	flex-direction: column;
}

.modal-product-image {
	display: flex;
	justify-content: center;
	margin-bottom: 15px;
}

.modal-product-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.modal-product-details {
	padding: 10px;
}

.modal-product-details h2 {
	margin-bottom: 8px;
	color: #333;
	font-size: 20px;
}

.modal-product-description {
	margin-bottom: 10px;
	color: #555;
	line-height: 1.5;
}

.modal-product-price {
	font-size: 16px;
	font-weight: 500;
	color: #444;
	margin-bottom: 15px;
}

.add-to-cart-modal {
	padding: 10px;
	font-size: 14px;
	width: 100%;
}

.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(20, 20, 20, 0.85);
	backdrop-filter: blur(5px);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 10000;
}

.modal-content.wide {
	background: #fff;
	padding: 2rem;
	border-radius: 8px;
	text-align: center;
	max-width: 700px;
	width: 90%;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.modal-images {
	display: flex;
	gap: 2rem;
	justify-content: center;
	flex-wrap: wrap;
}

.modal-image-block {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.modal-image-block img {
	cursor: pointer;
	max-width: 250px;
	border-radius: 6px;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.modal-image-block p {
	margin-top: 0.5rem;
	font-weight: bold;
	font-family: "VT323", monospace;
	font-size: 1rem;
}

#close-image-modal {
	margin-top: 1.5rem;
	padding: 0.5rem 1.2rem;
	font-size: 1rem;
	cursor: pointer;
}

/* cart */

.cart-ui {
	position: fixed;
	top: 100px;
	right: 20px;
	width: 300px;
	max-height: 70%;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #ddd;
	padding: 10px;
	font-size: 14px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	z-index: 1000;
}

.cart-ui h3 {
	margin-bottom: 10px;
}

.cart-ui ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.cart-ui li {
	margin-bottom: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
}

.cart-ui .remove-from-cart {
	margin-left: 10px;
	background: #d9534f;
	color: #fff;
	border: none;
	padding: 5px;
	border-radius: 3px;
	cursor: pointer;
	font-size: 12px;
}

/* Checkout */

.cart-ui .remove-from-cart:hover {
	background: #c9302c;
}

.cart-ui .total {
	margin-top: 20px;
	font-weight: bold;
	text-align: right;
}

.checkout-container {
	min-width: 700px;
	max-width: 1000px;
	margin: 3rem auto;
	background: #fff;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
}

.checkout-container h1 {
	text-align: center;
	margin-bottom: 2rem;
}

.checkout-summary,
.checkout-form {
	margin-bottom: 1.5rem;
}

.checkout-summary ul {
	list-style: none;
	padding: 0;
}

.checkout-summary li {
	margin-bottom: 0.5rem;
	display: flex;
	justify-content: space-between;
}

.checkout-total {
	font-weight: bold;
	text-align: right;
	margin-top: 1rem;
}

.checkout-actions {
	text-align: center;
	margin-top: 2rem;
}

.checkout-actions button {
	background: #3498db;
	color: white;
	border: none;
	padding: 0.75rem 2rem;
	border-radius: 5px;
	cursor: pointer;
}

.checkout-actions button:disabled {
	background: #aaa;
	cursor: not-allowed;
}

input[type="text"],
input[type="email"],
textarea {
	width: 100%;
	padding: 0.75rem;
	margin-top: 0.25rem;
	margin-bottom: 1rem;
	border: 1px solid #ccc;
	font-size: 1rem;
	font-family: inherit;
	background-color: #fefefe;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
	border-color: #3498db;
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
	outline: none;
}

textarea {
	resize: vertical;
	min-height: 80px;
}

fieldset {
	border: none;
	padding: 0;
	margin-bottom: 1.5rem;
}

label {
	display: block;
	margin-top: 0.75rem;
	font-weight: bold;
}

.name-row {
	border: none;
	margin-bottom: 1.5rem;
}

.name-inputs {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.name-inputs div {
	flex: 1;
	min-width: 150px;
}

.name-inputs label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: bold;
}

.name-inputs input {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.invoice {
	background-color: #f4f4f4;
	padding: 1rem;
	border-radius: 6px;
	margin-top: 2rem;
}

/* info pages */

.info {
	margin: 2rem auto;
	padding: 1.5rem;
	background-color: #fdfdfd;
	color: #222;
	line-height: 1.6;
	box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
}

.info h2 {
	font-size: 1.5rem;
	color: #2c3e50;
	margin-bottom: 0.5rem;
}

.info h3 {
	font-size: 1.2rem;
	margin-top: 1.5rem;
	color: #34495e;
}

.info ul {
	list-style: disc;
	padding-left: 1.5rem;
	margin-top: 0.5rem;
}

.info p {
	margin-bottom: 1rem;
}

/* footer */

footer.bottom-bar {
	background-color: #444;
	padding: 1rem 0;
	font-size: 14px;
	color: #eee;
	border-top: 1px solid #333;
	width: 100%;
}

.bottom-bar-content {
	max-width: 1000px;
	margin: 0 auto;
	padding: 0 1rem;
}

.bottom-bar-content a {
	color: tan;
	margin-left: 0;
}

.bottom-bar-content a:hover {
	text-decoration: underline;
}

.footer-table {
	width: 100%;
	color: #eee;
}

.footer-table td {
	vertical-align: top;
	padding: 0.5rem 1rem;
	width: 50%;
}

.footer-table img {
	size: 30%;
}

@media screen and (max-width: 600px) {
	.footer-table td {
		flex-direction: block;
		width: 100%;
		padding: 0rem 2.5rem;
	}

	.footer-table img {
		display: none;
	}
}
