:root {
  --red: #df3e3e;
  --cream: #edd7c3;
  --cart: #e53737;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}
body {
  height: auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #1c1b22;
}

h2 {
  margin: 0;
  margin-top: 1rem;
  margin-bottom: .7rem;
  font-size: 1.1rem;
  font-style: italic;
  text-transform: capitalize;
}
h3 {
  text-transform: capitalize;
}

nav {
	position: fixed;
	padding: .7rem 0;
	z-index: 1;
	/* top: 0; */
	width: 100%;
	/* align-items: center; */
	/* padding-bottom: 1.3rem; */
	background-color: rgba(0,0,0,10%);
	-webkit-backdrop-filter: blur(1.4rem);
	backdrop-filter: blur(1.4rem);
	border-bottom: 1px solid black;
}
#nav-div {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	grid-template-areas: "left center right";
	max-width: 768px;
	margin: 0 auto;
}

/*nav::before {
	content: "";
	position: absolute;
	inset: 0;
	backdrop-filter: blur(2rem);
	pointer-events: none;
	z-index: -1;
	border-bottom: 1px solid black;
}*/

nav button {
	/* margin: 0 auto; */
	background-color: #f8e5b5;
	color: #4d4747;
	font-weight: bold;
	border: none;
	padding: 0.1rem 0.7rem;
	border-radius: 0.4rem;
	outline: 1px solid #2d2d2d;
	outline: none;
}

#cart-btn {
  justify-self: center;
  grid-area: center;
}
#opt-btn {
  justify-self: end;
  grid-area: right;
  margin-right: 5%;
  opacity: 0;
}
#opt-btn.visible {
  animation: fadeIn 120ms ease forwards;
}
#back-btn {
  justify-self: start;
  grid-area: left;
  display: flex;
  text-transform: capitalize;
  opacity: 0;
  margin-left: 5%;
}
#back-btn.visible {
  animation: fadeIn 120ms ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    scale: .9;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

#back-arrow {
  width: 1.4rem;
  height: 100%;
  margin-right: 0px;
  background-image: url("/assets/arrow.svg");
  background-repeat: no-repeat;
  background-size: 96%;
  background-position: center;
  margin-right: 0.1rem;
}

main {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  align-items: center;
  color: #888;
  flex-grow: 1;
  position: relative;
  font-family: serif;
  margin-top: 3rem;
  padding-bottom: 3rem;
}

.cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.8rem;
  width: 77%;
  margin-bottom: 2.5rem;
}
.cat {
  width: 100%;
}
.cat img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  color: transparent;
}
.cat p {
	text-align: center;
	text-transform: uppercase;
	font-size: 1.05rem;
	font-weight: bold;
	color: #b0b0a0;
	margin: 0;
	margin-top: .3rem;
}

.pieces {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .25rem;
  width: 98%;
}
.threeinrow {
  grid-template-columns: repeat(3, 1fr);
}

.piece {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
}
.piece img {
  display: block;
  width: 100%;
}
.piece p {
  display: block;
  position: absolute;
  margin: 0;
  top: 6%;
  background-color: #2b2b2b;
  border-radius: 12px;
  font-size: 0.7rem;
  padding: 0 0.4rem;
  right: 6%;
  font-weight: bold;
  color: #575757;
  z-index: -1;
  transition: all 180ms;
  text-transform: uppercase;
}
.in-cart p {
	color: #1a0505;
	background-color: #ea2149;
}
.in-cart p {
	color: #474242;
	background-color: #f8e5b5;
}
.in-cart p {
	color: #271e1e;
	background-color: #ffe2ac;
}
img.lazy-img {
  opacity: 0;
  transition: opacity 1ms;
}
img:not(.lazy-img) {
  opacity: 1;
}

@keyframes incart {
  from {
    opacity: 0;
    scale: .7;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
@keyframes bounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.bounce {
  animation: bounce 170ms ease;
}

#cart-count {
  background-color: #4d4747;
  border-radius: 0.3rem;
  padding: 0 0.2rem;
  color: #f8e5b5;
}

.merci {
  width: 20rem;
  aspect-ratio: 2/1;
  position: relative;
}
.merci img {
  position: absolute;
  width: 130%;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
}
.thanks {
  margin: 0;
}
#submit-msg {
	margin-top: 1em;
	color: #a8817b;
	font-size: .8rem;
	font-style: italic;
}
.submit-cart-btn {
	background-color: #f8e5b5;
	color: #333;
	font-weight: bold;
	padding: 0.2rem 1rem;
	border: none;
	border-radius: 0.4rem;
	font-size: 0.9rem;
	margin-top: 1rem;
}
form {
	display: flex;
	flex-direction: column;
	align-items: center;
}
form input {
  font-size: 1rem;
	font-family: serif;
	font-style: italic;
	text-align: center;
}
form button {
  padding: 0.1rem 1rem;
  margin-top: .8rem;
	font-family: serif;
}


.counter {
  display: flex;
  justify-content: center;
  width: min-content;
  margin: 0 auto;
  align-items: center;
  transform: translateY(0.5rem);
}
.counter button {
  border-radius: 1rem;
  border: none;
  background-color: #8b2e3b;
  height: 100%;
  line-height: 1rem;
  padding: 0.1rem 0.5rem;
  transition: all 80ms;
  color: #eee;
}
.counter button:nth-of-type(2) {
  background-color: darkslategrey;
}
.counter button:hover {
  filter: brightness(1.5) contrast(1.1);
}
.counter span {
  padding: 0.1rem 1rem;
  font-size: 1.3rem;
  font-weight: bold;
  /*font-style: italic;*/
  color: #aaa;
}

.sanalogo {
  width: 7rem;
  aspect-ratio: 2/1;
  background-image: url(/assets/sana.svg);
  background-size: contain;
  background-repeat: no-repeat;
  margin-bottom: 1rem;
  background-position: center;
}
