@import url('https://fonts.googleapis.com/css2?family=Dancing+Script&display=swap');

#sort-section {
	margin: 0 auto;
	width: fit-content;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 10px;
}

#sort-section p {
	width: fit-content;
	color: var(--gray);
	margin-bottom: 5px;
}

#sort-buttons {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 5px;
}

#sort-buttons button {
	background-color: var(--darkgray);
	color: var(--gray);
	border: none;
	border-radius: 20px;
	padding: 4px 8px;
	cursor: pointer;
}

#patches {
	width: 80%;
  	margin: 0 auto;
	display: flex;
	flex-direction: column;
}

#sort-by {
	width: fit-content;
	margin: 0 auto;
	margin-bottom: 15px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 5px;
	color: var(--gray);
}

#sort-by select {
	padding: 4px 4px;
	background-color: var(--backdrop);
	border: 1px solid var(--gray);
	color: var(--gray);
	border-radius: 5px;
}

.available-patches {
  	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	flex: 0 0 0.25;
}

.available-patches > div {
	border-top-left-radius: var(--border-radius);
	border-top-right-radius: var(--border-radius);
	border-bottom-left-radius: var(--border-radius);
	border-bottom-right-radius: var(--border-radius);
}

.available-patches h1 {
  	font-size: 18px;
  	text-align: center;
  	margin-top: 20px;
  	color: white;
  	width: 100%;
}

.patch-name {
	font-size: 16px;
	font-weight: bold;
	text-transform: uppercase;
	font-style: italic;
	max-width: 210px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.patch-cost {
	text-transform: uppercase;
}

.patch-title {
  	margin: 0 auto;
	margin-top: 6px;
	margin-bottom: 2px;
	gap: 5px;
	display: flex;
	flex-direction: column;
  	align-items: center;
	color: white;
}

.patch-box {
	position: relative;
	display: inline-block;
	flex-wrap: wrap;
	border-top-left-radius: var(--border-radius);
	border-top-right-radius: var(--border-radius);
	cursor: pointer;
}

.img-container {
	width: 210px;
	height: 210px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.img-container img {
	width: 90%;
	height: 90%;
	border-radius: var(--border-radius);
	transition: transform 0.2s ease;
}

.patch-box:hover img {
	transform: scale(1.2);
}

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

.interest-button {
	width: 100%;
	height: 30px;
	display: block;
	margin: 0 auto;
	margin-top: 5px;
	border-radius: var(--border-radius);
	background: var(--button-gradient);
	color: white;
	border: 0px solid transparent;
	cursor: pointer;
	text-transform: uppercase;
	font-size: 16px;
	font-weight: bold;
	padding-bottom: 2px;
}

.interest-button:hover {
	background: transparent;
	color: white;
	border-width: 1px;
	border-color: white;
	letter-spacing: 0.05rem;
}

#patch-form {
	margin-bottom: -1px;
	border-radius: var(--border-radius);
	overflow: hidden;
	cursor: pointer;
}

.coming-soon-tag {
	position: absolute;
  	top: 3px;
  	right: 0;
	text-align: right;
	padding: 4px 8px;
	font-size: 14px;
	z-index: 4;
	color: white;
	border-radius: var(--border-radius);
	background-color: rgba(101, 113, 126, 0.3);
	backdrop-filter: blur(4px);
}

.popular-tag {
	position: absolute;
  	bottom: 3px;
  	right: 0;
	text-align: right;
	padding: 4px 8px;
	font-size: 14px;
	z-index: 4;
	color: white;
	border-radius: var(--border-radius);
	background-color: rgba(101, 113, 126, 0.3);
	backdrop-filter: blur(4px);
}

@media screen and (max-width: 1100px) {
	.interest-button:hover {
		background: var(--button-gradient);
		border: 0px solid transparent;
	}
}

@media screen and (max-width: 1000px) {
	.patch-box:hover img {
		transform: none;
	}
}

@media screen and (max-width: 940px) {
    #patches {
		width: 90%;
    }
}

@media screen and (max-width: 838px) {
	#patch-popup {
		width: 70%;
		padding-bottom: 5%;
	}
	#patch-popup img {
		width: 90%;
	}
}

@media screen and (max-width: 653px) {
	#patches {
		width: 85%;
	}

	.patch-title {
		height: 60px;
	}

	.patch-cost {
		font-size: 15px;
	}

    .patch-name {
		font-size: 15px;
		text-align: center;
		max-width: 130px;
    }

	.buy-patch-button {
		font-size: 12px;
	}
  
  	.img-container img {
      	display: block;
      	margin: 0 auto;
		width: 170px;
    }
  	
    .popular-tag, .coming-soon-tag {
		font-size: 12px;
    }
  	
    #display-image {
		width: 400px;
    }

	.interest-button {
		font-size: 12px;
	}
}

@media screen and (max-width: 580px) {
	.patch-title {
		height: 60px;
	}

	.patch-cost {
		font-size: 15px;
	}

	.patch-name {
		font-size: 14px;
		overflow: auto;
		white-space: wrap;
		text-overflow: initial;
		max-width: 150px;
	}

	.interest-button {
		padding-top: 2px;
		padding-bottom: -2px;
		font-size: 14px;
	}

	.img-container {
		width: 170px;
		height: 170px;
	}

	.img-container img {
		width: 100%;
		height: 100%;
	}
}

@media screen and (max-width: 520px) {
	.flow-out:hover {
		letter-spacing: normal !important;
		font-weight: bold;
	}

	#sort-section {
		width: 80%;
	}
}

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

	.available-patches {
		gap: 10px;
	}
}

@media screen and (max-width: 380px) {
	.patch-info {
		display: none;
	}
}

@media screen and (max-width: 356px) {
	.img-container {
		width: 150px;
		height: 150px;
	}
	
	.interest-button {
		width: 100%;
	}
}