* {
    scrollbar-width: thin;
    scrollbar-color: #f0f0f2 transparent;
} 

main header {
	position: relative;
 	background: none;
	padding: 0;
	flex-flow: column;
	justify-content: flex-start;
	backdrop-filter:  none;
}

main p {
	line-height: 1.4rem;
}

details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

.templates section {
	padding: 6rem 0;
}
.template section {
	padding: 2rem 0;
}
.breadcrumb {
	margin: 0;
	padding: .5rem 0 .3rem;
	display: flex;
	flex-flow: row;
  flex-wrap: wrap;
  opacity: .8;

}
.breadcrumb > li:after {
	content: '/';
	margin: 0 .3rem;
  opacity: .6;
}
.breadcrumb > li {
	list-style: none;
	font: 400 .9rem var(--font);
}
.breadcrumb > li a {
  font: 400 .9rem var(--font);
	color: #000;
  text-transform: capitalize;
}
h1 {
	max-width: 30ch;
	width: 100%;
	font: 600 3rem/3.2rem var(--space-font);
}
h1 + p {
  padding: 1.5rem 0;
  max-width: 44ch;
  width: 100%;
  font: 400 1rem / 1.5rem var(--font);
  opacity: .8;
}
.templates h1,
.templates p {
	margin: 0 auto;
	text-align: center;
}
.template-item {
	width: calc(25% - 1.5rem);
}
.template-item img {
	width: 100%;
	object-fit: cover;
	/*border-radius: .5rem;*/
	box-shadow: 0 2px 4px 0 rgba(7,23,54,0.12), 0 1px 2px 0 rgba(7,23,54,0.16);
	border-radius: 4px;
}
.template-item h2 {
	padding: .3rem 0;
	font: 500 1rem/1.2rem var(--font);
	text-align: left;
}
.template-item p {
	text-align: left;
}

main {
	margin: 0 auto;
	padding: 3rem 0 0;
    width: clamp(240px, calc(100% - 3rem), 1360px);
    animation: contentFadeIn ease .8s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

.template header {
	max-height: 100%;
}
.template h1 {
	padding-top: .2rem;
	max-width: 42ch;
	font: 600 2rem/2.2rem var(--space-font);
	letter-spacing: -0.5px;
}
.template h2 {
	font: 600 1.5rem/1.7rem var(--font);	
}
.template h3 {
	margin: 0;
	font: 550 1.2rem/1.3rem var(--font);	
}

.template-layout {
	display: flow-root;
    --main-column-width: calc(100% - var(--gap) - var(--sidebar-width));
    --sidebar-width: clamp(350px, 33.33%, 450px);
    --gap: 3rem;
}

.template-gallery {
	grid-column: 1 / -1;
	width: var(--main-column-width);
    float: left;
}
.template-sidebar {
	grid-column: 1 / -1;
	position: sticky;
	top: 4rem;
	width: var(--sidebar-width);
    float: right;
    clear: right;
    display: flex;
    flex-flow: column;
    gap: 1rem;
}
.template-specs {
	position: sticky;
	top: 400px;
	width: var(--sidebar-width);
    float: right;
    clear: right;
}
.template-content {
	display: flex;
	flex-flow: column;
	gap: 1rem;
	width: var(--main-column-width);
    float: left;
}
.template-faq {
	width: var(--main-column-width);
    float: left;
}
.template-creator,
.template .template-creator {
	padding: 0 0 2rem 0;
	width: var(--main-column-width);
    float: left;
    display: flex;
    flex-flow: row;
    gap: 1.5rem;
}
.template-creator img {
	width: 80px;
	height: 80px;
	border-radius: 50%;
}
.template-creator h2 {
	padding: 0;
	font: 550 .9rem var(--font);
}
.template-creator p {
	/*padding-top: .5rem;*/
	max-width: 56ch;
	font: 400 .93rem/1.3rem var(--font);
	opacity: .9;
}


.template-gallery .thumbnails {
	width: 120px;
}
.product-big-image {
	width: 100%;
}
.template-gallery img {
	border-radius: .5rem;
}
.template-gallery .thumbnails img {
	cursor: pointer;
	opacity: .64;
}
.template-gallery .thumbnails img:hover {
	opacity: 1;
}
.template-gallery .thumbnails img.active {
	border: 1px solid #000;
	opacity: 1;
}

.btn-group {
	padding: .3rem 0 .6rem 0;
	display: flex;
	flex-flow: row;
	gap: 1rem;
}
.btn {
	display: block;
	/*width: 100%;*/
	padding: 0 1.3rem;
	font: 550 1rem/44px var(--font);
	border-radius: .5rem;
}

.btn-primary {
	background: #000;
	color: #fff;
}
.btn-secondary {
	background: #eee;
	color: #000;
}

.template-sidebar .price {
	/*font: 550 1.2rem var(--font);*/
	/*font-weight: 600;*/
}

.template-sidebar li {
	padding: .2rem 0;
}

.template-content h3 {
	padding-bottom: .5rem;
}

.template-content p {
	padding: .4rem 0;
}
.template-content ul {
	padding: 0 0 .5rem 1rem;
}
.template-content li {
	padding: .2rem 0;
	list-style: disc;
}

.faq dt {
	font: 550 1.2rem/1.3rem var(--font);
}
.faq dd {
	margin: 0;
	padding: .5rem 0 1rem 0;
}
.faq a {
	text-decoration: underline;
}
.other-templates {
	padding: 0;
	max-width: 100%;
	width: 100%;
}
.other-templates ul {
	display: flex;
	flex-flow: row;
	gap: 2rem;
}
.other-templates ul li a {
	display: block;
}
.other-templates ul li h3 {
	padding: 4px 0 4px;
	font: 550 1.1rem/1.5rem var(--font);
}
.other-templates ul li {
	width: calc(33.5% - 1.5rem);
}

.other-templates ul li img {
	aspect-ratio: 4 / 3;
	width: 100%;
	object-fit: cover;
	border-radius: .5rem;
}

  
	#masonry {
	  display: flex;
	  gap: 2rem;
	  align-items: flex-start;
	}

	.column {
	  flex: 1;
	  display: flex;
	  flex-direction: column;
	  gap: 2rem;
	}

	.card {
	  width: 100%;
	}


	/* Modal backdrop */
#modal-backdrop {
  position: fixed;
  padding: .5rem;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
      backdrop-filter: blur(12px) saturate(2.4);

  /* IMPORTANT */
  display: none;
}

#modal-backdrop.active {
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Modal box */
#modal {
  background: white;
  /*max-width: 600px;*/
  width: calc(100% - 1rem);
  height: calc(100vh - 1rem);
  overflow: hidden;
  border-radius: 12px;
  /*padding: 1rem;*/
  /*position: relative;*/
  position: fixed;
    /*padding: 1.5rem;*/
      animation: movein 0.3s both;
}

/* Close button */
#modal-close {
  position: absolute;
  z-index: 3;
  top: 0.5rem;
  right: 0.5rem;
  border: none;
  background: none;
  font-size: 1.2rem;
  cursor: pointer;

      cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: block;
    width: 32px;
    height: 32px;
    background: rgb(240 240 242) !important;
    border-radius: 8px;
}
#modal-close::before,
#modal-close::after {
	content: '';
    position: absolute;
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #8b8eb5;
}
#modal-close::before {
	top: calc(50% - 1px);
    left: calc(50% - 8px);
    transform: rotate(-45deg);
}
#modal-close::after {
    top: calc(50% - 1px);
    left: calc(50% - 8px);
    transform: rotate(45deg);
}
.modal-image-container {
	padding: 0 1rem 0 6px;
	width: 70%;
	width: clamp(240px, 70%, 1600px);
	height: 100vh;
	overflow-y: scroll;
}

.modal-image-container img {
	width: 100%;
	margin: 3rem 0;
	box-shadow: 0 4px 8px 0 rgba(7,23,54,0.08), 0 2px 4px 0 rgba(7,23,54,0.12), 0 1px 2px 0 rgba(7,23,54,0.16);
	border-radius: .8rem;
}

.modal-sidebar {
	padding: 2rem 1rem 0;
	width: clamp(240px, calc(30% - 2rem), 360px);
	/*position: sticky;*/
	/*top: 1rem;*/
	/*right: 0;*/
}

.modal-sidebar h2 {
	font: 600 1.6rem/1.8rem var(--font);
}
.modal-sidebar h3 {
	/*font: 600 1.5rem/1.8rem var(--font);*/
	font: 550 1.1rem/1.3rem var(--font);
	padding: 1rem 0 .7rem;
}
.modal-desc p.large {
	font: 400 1.1rem/1.4rem var(--font);
}
.modal-desc p,
.modal-desc li {
	font: 400 .9rem/1.16rem var(--font);
	text-align: left;
}
.modal-desc p {
	padding: 0 0 .8rem;
}
.modal-desc li {
	padding: 0 0 .5rem;	
}
.modal-button {
	padding-top: .5rem;
}

h1 {
	display: flex;
	flex-flow: column;
	align-items: center;
	gap: .3rem;
	
}

h1 span {
	display: flex;
	flex-flow: row;
	justify-content: center;
	align-items: center;
	gap: 1rem;
}

h1 span span:nth-of-type(1) {
    display: inline-block;
    overflow: hidden;
    width: 56px;
    height: 48px;
    position: relative;
    border-radius: 24px;
    border: 1.5px solid #fff;
}
h1 span span img {
    position: absolute;
    top: -4px;
    left: -4px;
    display: inline-block;
    width: 125%;
    height: auto;
    object-fit: cover;
    border-radius: 50%;
}

@media screen and (max-width: 1080px) {
	main header {
		padding-bottom: 2rem;
	}
    .template-layout {
    	display: flex; 
    	flex-flow: column;
        /*grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);*/
        /*align-items: baseline;*/
    }
    .template-layout section {
    	padding: 0;
    }
    .template-gallery {
    	width: 100%;
    }
    .template-sidebar {
    	position: relative;	
    	top: 0;
    }
    .template-sidebar,
    .template-content,
    .template-faq,
    .template .template-creator {
    	width: 100%;
    }
 }

 @media screen and (max-width: 960px) {
 	
 	.template-item {
 		width: calc(50% - 1rem);
 	}

 	.other-templates ul li h3 {
 		font: 500 1rem/1.3rem var(--font);
 	}
 }

 @media screen and (max-width: 640px) {
 	/*main header {
 		position: relative;
 		background: none;
 	}*/
 	.templates h1 {
 		font: 600 2.5rem/2.7rem var(--space-font)
 	}
 	.template-gallery .thumbnails {
 		gap: .5rem;
 	}
 	.template-gallery .thumbnails {
 		max-width: 80px;
 	}
 	.templates-list {
 		flex-flow: column;
 	}
 	.template-item {
 		width: 100%;
 	}
 		#modal {
 			padding: 4rem 0 0;
 			overflow-y: scroll;
 		}
 		#modal-content {
 			flex-flow: column;
 		}
 		.modal-image-container {
 			padding: 0 .5rem;
 			gap: 1rem;
 			width: 100%;
 			height: auto;
    	overflow: hidden;
 		}
 		.modal-image-container img {
 			margin: 0;
 			border-radius: 6px;
 		}
 		.modal-sidebar {
 			padding: 0 1rem 3rem 1rem;
 			width: 100%;
 		}
 }

 @media screen and (max-width: 480px) {
 		.other-templates ul {
 			flex-flow: column;
 		}
 		.other-templates ul li {
 			width: 100%;
 		}
 		h1 span {
 			display: initial;
 		}
 		h1 span span:nth-of-type(1) {
 			display: none;
 		}
 }

 @media screen and (prefers-color-scheme: dark) {
 	* {
    scrollbar-color: rgb(255 255 255 / 12%) transparent;
} 
 	.breadcrumb > li a {
 		color: #fff;
 	}
 	.btn-primary {
 		background: #fff;
 		color: #1B1B1D;
 	}
 	.btn-secondary {
 		background: rgba(255, 255, 255, .1);
 		color: #fff;
 	}
 	dt {
 		color: #fff;
 	}

 	#modal {
 	  background: #2a2642 !important;
 	  border: 1px solid rgba(255,255,255,0.16);
    }
  #modal-close {
      background: rgb(255 255 255 / 12%) !important;
  }
  #modal-close:hover {
      background: rgb(255 255 255 / 18%) !important;
  }
 }