html,body {
	font-size: 14pt;
	height: 100%;
	padding: 0;
	margin: 0;
}

body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 1 1 auto;
	font-family: Helvetica Neue,Helvetica,Arial,sans-serif; 
}

p {
	display: inline-block;
	margin: 0.5rem;
}

* {
	margin: 0;
	padding: 0;
}

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

a {
	text-decoration: none;
}

.hover {
	-webkit-user-select: none;
	-webkit-touch-callout: none;        
}

:hover, :focus {
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
	-o-transition: 0.5s;
	transition: 0.5s;
}

h1 { 
    font-size: 2em;
}
h2 {
    font-size: 1.5em;
}
h3 { 
    font-size: 1.3em;
}
h4 { 
	font-size: 1.2em;
}
h5 { 
    font-size: 1em;
}
h6 { 
    font-size: .8em;
}

/* !-------- Layout setup --- */

main {
	flex-grow: 1;
}

article {
	margin: auto;
}

.hero {
	width: 100%;
	height: calc(100vh - 50px);
	display: flex;
	justify-content: center;
	align-items: center;
}

.hero-inner {
	width: 600px;
}

.image-content, .gallery-info, .gallery, .product-info, .product-description, .product-list, .cart {
	width: 60%;
	margin: 1rem auto;
	box-sizing: border-box;
}

.text-content {
	padding: 1rem 2rem;
}

.page-header {
	width: 100%;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	padding: 0 1rem;
	box-sizing: border-box;
}

.section-header {
	margin: 1rem auto 2rem;
}

.gallery {
	margin-bottom: 1rem;
}

.gallery-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.gallery-page {
	margin: auto;
}

.gallery-content, .product-list {
	margin: 2rem auto rem auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.5rem;
}

.gallery-item {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* !-------- Custom Order layout --- */

.custom input {
	padding: 0.5rem 1rem;
	box-sizing: border-box;
}

.custom .options {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0.5rem;
}

.category {
	margin: 1rem;
	padding: 2rem;
}

.showcase {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	margin-bottom: 1rem;
}

.custom br {
	display: none;
}

.error, .success {
	width: fit-content;
	margin: auto;
	padding: 2rem;
}

.error br {
	display: initial;
}

.error h4, .success h4 {
	margin: 0 auto;
}

.contact-info {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	width: 100%;
	gap: 2rem;
}

.contact-section, .contact-info input, .notes input {
	width: 100%;
}

/* !-------- Store layout --- */

.store-pages {
	margin-top: -1rem;
	margin-right: 3rem;
	margin-bottom: 2rem;
	text-align: right;
}

.product-info {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

.product-gallery {
	display: grid;
	grid-template-columns: 1fr 5fr;
	max-height: 600px;
	gap: 0.5rem;
}

.product-images {
	overflow-y: scroll;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
}

.product-images img, .product-preview img {
	width: 100%;
	height: auto;
}

.product-image {
	scroll-snap-align: start;
}

.product-nav {
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
	overflow-y: scroll;
	scrollbar-width: none;
}

.product-details ul {
	list-style: none;
}

.purchase {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
}

.purchase h3 {
	display: inline;
}

/* Cart Page */

.cart-item {
	display: flex;
	flex-direction: row;
	justify-content: space-around;
	align-items: flex-start;
	width: 100%;
	margin: 1rem auto;
	padding-bottom: 1rem;
}

.item-thumb {
	width: 150px;
}

.item-info {
	width: 60%;
	align-self: flex-start;
}

.item-title {
	text-align: left;
	margin-left: 1rem;
	margin-bottom: 0.5rem;
	padding: 0;
}

.item-total {
	margin: 0.5rem 0;
	line-height: 2rem;
}

.quantity-input {
    width: 45px;
	height: 30px;
    text-align: center;
}

.cart-extras {
	display: flex;
	flex-direction: row;
	justify-content: center;
	margin-bottom: 0.5rem;
	text-align: right;
}

.cart-extras h5 {
	text-align: inherit;
	padding: 0;
}

.extras-left, .extras-right {
	width: 20%
}

.extras-right {
	margin-left: 0.5rem;
	text-align: left;
}

.cart-operations {
	text-align: center;
}

.cart-operations .button, #submit {
	display: block;
	width: 200px;
	padding: 0.6rem 0;
	margin: 1rem auto;
}

/* !-------- Footer layout --- */

footer {
	align-self: flex-end;
	width: 100%;
	padding: 0;
	text-align: center;
}

.footer-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
}

.footer-layout div {
	grid-column: 1/1;
	grid-row: 1/1;
}

.footer-top {
	z-index: 1;
}

.footer-content {
	text-align: left;
	margin-bottom: -10px;
	padding: 0.5rem 1rem;
	font-size: 0.8rem;
	box-sizing: border-box;
}

.footer-menu {
	padding: 0.5rem 1rem;
	text-align: left;
	width: 50%;
}

.footer-menu li {
	list-style-type: none;
	padding: 0.25rem 0;
}

/* !-------- Menu --- */

nav ul, nav li {
	list-style: none;
}

#main-menu ul {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
}

#main-menu a {
	padding: 1rem 0.5rem;
	font-size: 1rem;
}

#main-menu label, #mobile-button {
  display: none;
}

/* Multi-level menu */

#menu li {
    margin:0;
}

#menu a.arrow::after {
    content:'';
    position:absolute;
    display:inline;
    top:50%;
    margin-top:-4px;
    right:8px;
}
        
/*Sub level menu items
---------------------------------------*/
#menu li ul {
    min-width:120px;
    position:absolute;
    display:none;
	top: 100%;
}

.has-submenu {
	position: relative;
}

#menu li:hover > ul {
    display: block;
}

/* Image Content */

.image-content .figure {
	flex-grow: 1;
	background: no-repeat center center;
	background-size: cover;
}

.image-top .figure {
	height: 400px;
}

.image-none figure {
	display: none;
}

.image-top {
	display: flex;
	flex-direction: column;
}

.image-left {
	display: flex;
	flex-direction: row;
}

.image-right {
	display: flex;
	flex-direction: row-reverse;
}

.image-left .text-content, .image-right .text-content {
	box-sizing: border-box;
	width: 60%;
}

/* Medium screens */
@media (max-width: 1200px){
	.image-content, .gallery-info, .gallery, .product-info, .product, .product-description {
		width: 80%;
		margin: 1rem auto;
	}
	.gallery-content, .product-list {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
	main {
		flex-direction: column;
	}
	main article {
		order: 1;
		width: 90%;
	}
	.custom .options {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Small screens */

@media screen and (max-width: 900px){
	.page-content {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		width: 100%;
	}
	.image-left, .image-right {
		flex-direction: column;
	}
	.image-content, .gallery-info, .gallery, .product-info, .product-list, .product-description {
		width: 95%;
		margin: 1rem auto;
	}
	.text-content, .image-left .text-content, .image-right .text-content {
		width: 100%;
		padding: 0 0.5rem;
		box-sizing: border-box;
	}
	.image-left .figure, .image-right .figure {
		width: 100%;
		height: 400px;
	}
	.gallery-content, .product-info, .product-list {
		grid-template-columns: repeat(1, 1fr);
		gap: 1rem;
	}
	.home-menu {
		display: flex;
		flex-direction: column;
	}
	.store-pages {
		margin: auto;
		text-align: center;
	}
	.section-header {
		margin: 1rem auto;
	}
	.page-header {
		flex-direction: column;
		align-items: left;
		padding-bottom: 0.5rem;
	}
	.custom .options {
		grid-template-columns: repeat(2, 1fr);
	}
	.cart {
		width: 100%;
	}
	.contact-info {
		flex-direction: column;
	}
	nav {
		width: 100%;
	}
	#menu ul {
		display: block;
		width: 150px;
		margin: 0 0.5rem;
		text-align: left;
	}
	#main-menu label {
		display: inline-block;
		font-size: 1.5rem;
		color: #fff;
	}
	  /* Break down menu items into vertical */
	#main-menu a {
		display: block;
		margin: 0.5rem auto;
	}
	/* Toggle show/hide menu on checkbox click */
	#main-menu div {
		transition: opacity 1.5s ease-out;
		opacity: 0;
		height: 0;
		overflow: auto;
	}
	#main-menu input:checked ~ div {
		opacity: 1;
		width: 100%;
		height: auto;
		overflow: inherit;
	}
	#menu li ul {
		width: 100%;
		display: block;
		box-sizing: border-box;
		transform: none;
		position: initial;
		left: unset;
		top: unset;
	}
	#menu li ul {
		background: none;
		text-align: left;
		margin-left: 2rem;
	}
}