@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital@1&display=swap');

#buy-form {
	width: 100%;
}

.already-added {
	width: 100%;
    height: 40px;
	background-color: var(--backdrop);
	color: white;
	border: 1px solid var(--greyed-out);
	border-radius: var(--border-radius);
	cursor: pointer;
	text-transform: uppercase;
	font-size: 18px;
	font-weight: bold;
}

.already-added.flow-out:hover {
	letter-spacing: 0.05rem;
	background-color: var(--backdrop);
	color: white;
}

#patch-stock {
    width: 50px;
    height: 40px;
	padding-left: 6px;
	background-color: rgba(0, 0, 0, 0.6);
	border: 2px solid var(--accent);
	border-radius: var(--border-radius);
	color: var(--accent);
	transition: 0.15s ease;
	cursor: pointer;
}

#patch-stock:hover {
	border-color: white;
	color: white;
}

#content {
	width: fit-content;
    margin: 0 auto;
	margin-top: 170px;
	display: flex;
	flex-direction: column;
	align-items: start;
}

#patch-display {
	background: linear-gradient(
		180deg,
		rgb(0 0 0 / 0) 0%,
		rgb(255 255 255 / 0.1) 100%
	);
	padding: 15px 30px 30px;
	border-radius: var(--border-radius);
}

#top {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: start;
	gap: 30px;
}

#reviews-text {
	font-weight: bold;
	margin-bottom: 5px;
}

#average-rating-wrapper {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 5px;
}

#average-rating-wrapper .review-star-img {
	width: 16px;
	height: 16px;
}

#add-review-section {
	width: 500px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

#add-review-section .review-stars {
	gap: 0;
	margin-bottom: 5px;
}

#add-review-section .review-stars .review-star-img {
	padding-right: 5px;
}

.input-row {
	display: flex;
	justify-content: space-between;
}

.input-row input,
.input-row textarea {
	width: 75%;
	background: var(--background);
	color: white;
	border: 1px solid var(--mediumgray);
	border-radius: 6px;
	padding: 6px 4px;
	outline: none;
	font-size: 14px;
	transition: border-color 0.2s ease;
}

.input-row input:focus,
.input-row textarea:focus {
	border-color: white;
}

.input-row textarea {
	max-width: 75%;
	min-width: 75%;
	height: 75px;
	min-height: 75px;
	max-height: 200px;
}

#submit-review-button,
#login-button {
	height: 30px;
	background: white;
	border: 2px solid white;
	border-radius: 100vw;
	text-transform: uppercase;
	font-weight: bold;
	letter-spacing: 0.05rem;
	cursor: pointer;
	transition: letter-spacing 0.15s ease;
}

#submit-review-button:hover,
#login-button:hover {
	background: transparent;
	color: white;
	letter-spacing: 0.15rem;
}

.review-stars {
	display: flex;
	gap: 5px;
	user-select: none;
}

.review-star-img {
	width: 24px;
	height: 24px;
}

.review-star-img.leave-review {
	cursor: pointer;
}

.review-star-img img {
	width: 100%;
	height: 100%;
}

#reviews-section {
	width: fit-content;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.review-row {
	position: relative;
	width: calc(500px - 16px);
	display: flex;
	flex-direction: column;
	gap: 5px;
	background: var(--backdrop);
	border-radius: 12px;
	padding: 6px 8px;
}

.review-row .review-star-img {
	width: 16px;
	height: 16px;
}

#delete-review-button {
	position: absolute;
	bottom: 5px;
	right: 5px;
	background: var(--warning-red);
	padding: 2px 8px;
	border: 0;
	border-radius: 100vw;
	color: white;
	cursor: pointer;
}

.review-desc {
	font-weight: normal;
	font-style: italic;
	margin-bottom: 5px;
}

.bottom-text {
	display: flex;
	align-items: center;
	gap: 10px;
}

.review-date {
	color: var(--gray);
	font-weight: normal;
}

.verified-review-tag {
	background: var(--darkgray);
	padding: 2px 8px;
	font-weight: normal;
	font-size: 12px;
	border-radius: 100vw;
	cursor: default;
}

#left {
	opacity: 0;
	position: relative;
	animation: fadeInElement 0.5s ease-out forwards;
}

#breadcrumbs {
	color: white;
	font-weight: normal;
	text-transform: uppercase;
	cursor: default;
}

#breadcrumbs a {
	text-decoration: none;
	transition: color 0.15s ease;
	color: var(--gray);
}

#breadcrumbs a:hover {
	color: white;
}

#breadcrumbs span {
	margin: 0 5px;
}

#img-section {
	display: flex;
	flex-direction: row;
	align-items: start;
}

#img-list {
	display: flex;
	flex-direction: column;
	max-height: 400px;
	overflow-y: scroll;
}

#img-section, #img-list {
	gap: 10px;
}

#img-list img {
	cursor: pointer;
	user-select: none;
	width: 96px;
}

.blur-load::before {
	content: "";
	position: absolute;
	inset: 0;
	animation: pulse 2.5s infinite;
}

.blur-load.loaded::before {
	content: none;
}

@keyframes pulse {
	0% {
		background: rgb(255 255 255 / 0);
	}
	50% {
		background: rgb(255 255 255 / 0.2);  
	}
	100% {
		background: rgb(255 255 255 / 0);
	}
}

.blur-load {
	height: 400px;
	position: relative;
	background-size: cover;
	background-position: center;
}

.blur-load.loaded > img {
	opacity:  1;
}

#img-list img {
	border-radius: calc(var(--border-radius) / 2);
}

.main-image {
	width: 400px;
	height: 400px;
	border-radius: calc(var(--border-radius) / 2);
	overflow: hidden;
	cursor: zoom-in;
}

.main-image img {
	width: 100%;
	height: 100%;
	user-select: none;
	opacity: 0;
	transition: opacity 0.15s ease-in-out,
				transform 0.2s ease;
	object-position: center;
	object-fit: cover;
}

.main-image img.zoomed-in {
	transform: scale(1.5);
}

#low-in-stock, #new-patch {
	position: absolute;
  	bottom: 0;
  	right: 0;
	text-align: right;
	padding: 4px 12px;
	z-index: 4;
	color: white;
	border-radius: calc(var(--border-radius) / 2);
	background-color: var(--backdrop-light);
}

#right {
	opacity: 0;
	min-width: 280px;
	height: calc(400px + 50px + 20px);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	color: white;
	animation: fadeInElement 0.5s ease-out forwards;
	animation-delay: 0.1s;
}

#bottom-section {
	width: 100%;
	margin-top: auto;
	display: flex;
	flex-direction: column;
	justify-content: start;
	gap: 10px;
}

#bottom {
	color: white;
}

#bottom > h4 {
	margin: 30px 0 15px;
	font-size: 18px;
}

#combined-patch-section, .combined-patch-boxes {
	display: flex;
	align-items: center;
	gap: 10px;
}

.plus-divider {
	font-size: 28px;
}

.combined-patch-box img {
	width: 128px;
	aspect-ratio: 1;
	border-radius: calc(var(--border-radius) / 2);
}

#add-combined-section {
	margin-left: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
}

#add-combined-button {
	width: 200px;
	height: 35px;
	text-transform: uppercase;
	font-weight: bold;
	font-size: 16px;
	color: white;
	background: var(--button-gradient);
	border: 0px solid transparent;
	border-radius: 100vw;
	cursor: pointer;
	transition: letter-spacing 0.15s ease;
}

#add-combined-button:hover {
	background: transparent;
	border: 1px solid white;
	letter-spacing: 0.1rem;
}

#add-combined-button.open-cart {
	background: var(--backdrop);
	border: 1px solid var(--greyed-out);
}

#payment-options-wrapper {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 20px;
	opacity: 0;
	animation: fadeInElement 0.5s ease-out forwards;
	animation-delay: 0.1s;
}

#payment-icons {
	display: flex;
	gap: 15px;
}

#payment-icons img {
	height: 20px;
	user-select: none;
	pointer-events: none;
}

#top-section h1 {
	font-size: 22px;
	text-transform: uppercase;
	font-style: italic;
}

#sold-out-text {
	margin-top: 12px;
}

#coming-soon-tag {
	width: fit-content;
	margin-top: 20px;
	padding: 4px 10px;
	user-select: none;
	pointer-events: none;
	border-radius: 100vw;
	text-transform: uppercase;
	font-weight: bold;
	font-style: italic;
	font-size: 13px;
	letter-spacing: 0.05rem;
	background: rgb(101 113 126 / 0.3);
}

#best-seller-tag {
	width: fit-content;
	display: flex;
	align-items: center;
	gap: 5px;
	user-select: none;
	pointer-events: none;
	background: rgb(136, 120, 33);
	padding: 4px 10px;
	margin-top: 20px;
	border-radius: 100vw;
	text-transform: uppercase;
	font-weight: bold;
	font-style: italic;
	font-size: 13px;
	letter-spacing: 0.05rem;
}

#best-seller-tag img {
	width: 16px;
	height: 16px;
}

@keyframes fadeInElement {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

#top-section h4 {
    margin-top: 4px;
    font-weight: 300;
}

#patch-price {
	margin-top: 20px;
	font-size: 24px;
	text-transform: uppercase;
}

#add-to-cart-button {
	width: 260px;
    height: 40px;
	padding-bottom: 2px;
	border: 0px solid transparent;
	border-radius: var(--border-radius);
	background: var(--button-gradient);
	color: white;
	font-weight: bold;
	font-size: 18px;
	transition: letter-spacing 0.15s ease;
	text-transform: uppercase;
	cursor: pointer;
}

#add-to-cart-button:hover {
	letter-spacing: 0.1rem;
	border-width: 2px;
	border-color: white;
	background: transparent;
	color: white;
}

#sold-out-button {
	width: 295px;
    height: 40px;
	padding-bottom: 2px;
	background-color: var(--backdrop);
	color: rgb(173, 173, 173);
	border: none;
	border-radius: var(--border-radius);
	font-weight: bold;
	font-size: 16px;
	transition: 0.15s ease;
	text-transform: uppercase;
	font-family: 'Lato', sans-serif;
	cursor: pointer;
}

#sold-out-button:hover {
	background-color: var(--greyed-out);
}

#interest-form {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

#interest-form h5 {
	max-width: 290px;
}

#interest-form span {
	display: flex;
	flex-direction: row;
	gap: 5px;
}

#interest-form input {
	background-color: transparent;
	color: white;
	border: 2px solid white;
	border-radius: var(--border-radius);
	padding: 8px 0 8px 8px;
}

#interest-patch-stock {
    width: 50px;
    height: 40px;
	padding-left: 6px;
	background-color: transparent;
	border: 2px solid white;
	border-radius: var(--border-radius);
	color: white;
	transition: 0.15s ease;
	cursor: pointer;
}

#interest-button {
	width: 240px;
    height: 40px;
	padding-bottom: 2px;
	background: var(--button-gradient);
	color: white;
	border: 0px solid transparent;
	border-radius: var(--border-radius);
	font-weight: bold;
	font-size: 16px;
	transition: letter-spacing 0.15s ease;
	text-transform: uppercase;
	font-family: 'Lato', sans-serif;
	cursor: pointer;
}

#interest-button:hover {
	background: transparent;
	color: white;
	border-width: 2px;
	border-color: white;
}

#add-to-cart-section {
	display: flex;
	flex-direction: row;
	gap: 5px;
	width: fit-content;
}

#pack-deal {
	width: 100%;
	background-color: rgba(0, 0, 0, 0.3);
	text-align: center;
	text-transform: uppercase;
	font-weight: bold;
	padding: 6px 0;
	border-radius: 4px;
	user-select: none;
}

#description {
	max-width: 295px;
    font-weight: normal;
    font-style: italic;
    margin-top: 10px;
    color: gray;
}

#vote-amount {
	color: var(--gray);
	margin-top: 10px;
	font-weight: normal;
}

#production-note {
	display: block;
	max-width: calc(295px - 16px);
    font-weight: normal;
	font-size: 14px;
    margin-top: 10px;
	background: var(--warning-gradient);
	color: white;
	padding: 4px 8px;
	border-radius: 6px;
	pointer-events: none;
	user-select: none;
}

#vote-patch-form button:hover {
	border-color: white;
	color: white !important;
}

.old-price {
	color: rgb(77, 77, 77);
	font-weight: normal;
	padding-left: 5px;
}

.bg-gradient {
	position: absolute;
	inset: 0;
	margin-top: -100px;
	z-index: -1;
	opacity: 0.4;
}

@media screen and (max-width: 1100px) {
	#add-to-cart-button:hover, #interest-button:hover {
		background: var(--button-gradient);
		border: none;
		letter-spacing: 0;
	}

	#patch-stock:hover {
		border-color: var(--accent);
		color: var(--accent);
	}

	#vote-patch-form button:hover {
		letter-spacing: 0;
		border-color: var(--accent);
		background-color: var(--accent) !important;
	}

	.already-added.flow-out:hover {
		letter-spacing: 0;
	}

	#sold-out-button:hover {
		background-color: var(--backdrop);
		letter-spacing: 0;
	}

	.bg-gradient {
		margin-top: -50px;
	}

	#production-note {
		max-width: calc(400px - 16px);
	}

	#description {
		max-width: 400px;
	}
}

@media screen and (max-width: 1000px) {
	#interest-form h5 {
		max-width: 390px;
	}

	#interest-form {
		margin-top: 0;
	}
	
	#content {
		width: 90%;
		display: flex;
		flex-direction: column;
		align-items: center;
		margin: 0 auto;
		margin-top: 130px;
	}

	#top {
		flex-direction: column;
		align-items: center;
		gap: 20px;
	}

    #add-to-cart-button, #interest-button {
        width: calc(100% - 50px - 5px);
        height: 40px;
    }

    #patch-stock {
        width: 50px;
        height: 40px;
    }

	#left {
		margin-top: 0;
	}

	#breadcrumbs {
		text-align: center;
	}

	#img-section {
		flex-direction: column;
	}

	#img-list {
		order: 2;
		flex-direction: row;
		justify-content: start;
		max-width: 400px;
		overflow-y: hidden;
		overflow-x: scroll;
	}

	#img-section > img {
		order: 1;
	}

	#low-in-stock, #new-patch {
		bottom: 108px;
	}

	#right {
		justify-content: start;
		text-align: center;
		box-sizing: border-box;
		width: 400px;
		height: min-content;
		padding: 10px;
	}
	
	#bottom-section {
		margin-top: 20px;
	}

	#payment-icons {
		justify-content: center;
	}

	#average-rating-wrapper {
		justify-content: center;
	}

	#add-review-section {
		width: 100%;
	}

	#add-review-section .review-stars {
		justify-content: center;
	}

	.input-row {
		flex-direction: column;
		text-align: start;
	}

	.input-row input,
	.input-row textarea {
		width: calc(100% - 10px);
	}

	.input-row textarea {
		max-width: calc(100% - 10px);
		min-width: calc(100% - 10px);
	}

	#submit-review-button:hover,
	#login-button:hover {
		background: white;
		color: black;
		letter-spacing: 0.05rem;
	}

	#reviews-section {
		width: auto;
	}

	.review-row {
		text-align: start;
		width: calc(100% - 16px);
	}

	#vote-amount {
		margin-top: 0;
	}

	#add-to-cart-section {
		width: 100%;
	}

	#add-to-cart-button:hover {
		background: var(--button-gradient);
		border: 0px solid transparent;
	}

	#best-seller-tag, #coming-soon-tag {
		margin: 0 auto;
		margin-top: 20px;
		margin-bottom: 10px;
	}

	#bottom > h4 {
		margin-top: 50px;
		text-align: center;
	}

	#combined-patch-section {
		flex-direction: column;
	}

	#add-combined-button {
		width: 250px;
		height: 40px;
		font-size: 16px;
	}
	
	#add-combined-button:hover {
		background: var(--button-gradient);
		letter-spacing: initial;
		border-color: transparent;
	}

	#add-combined-button.open-cart:hover {
		background: var(--backdrop);
		border-color: var(--greyed-out);
	}

	.main-image {
		cursor: default;
	}
}

@media screen and (max-width: 768px) {
	#payment-options-wrapper {
		justify-content: center;
		margin-right: 0;
	}
}

@media screen and (max-width: 530px) {
	#patch-display {
		padding: 10px 20px 20px;
	}
	
	#interest-form h5 {
		max-width: 290px;
	}

	.blur-load {
		height: 300px;
	}
	
	.main-image {
		width: 300px;
	}

	.input-row input,
	.input-row textarea {
		width: calc(100% - 10px);
	}

	.input-row textarea {
		max-width: calc(100% - 10px);
		min-width: calc(100% - 10px);
	}

	#img-list {
		max-width: 300px;
	}

	#img-list img {
		width: 72px;
	}

	#low-in-stock, #new-patch {
		bottom: 84px;
	}

    #add-to-cart-button, #interest-button {
        width: 100%;
    }

	#add-to-cart-section {
		width: 100%;
	}

    #patch-stock {
        width: 50px;
    }

	#description {
		max-width: 300px;
	}

	#production-note {
		max-width: calc(300px - 13px);
	}

	#breadcrumbs {
		margin-bottom: 5px;
	}

	#right {
		height: min-content;
		width: 300px;
		border-radius: calc(var(--border-radius) * 1.5);
	}
}

@media screen and (max-width: 356px) {
	#interest-form h5 {
		max-width: 260px;
	}

	.blur-load {
		height: 270px;
	}

	.main-image {
		width: 270px;
	}

	#img-list {
		max-width: 270px;
	}

	#img-list img {
		width: 64px;
	}

	#low-in-stock, #new-patch {
		bottom: 76px;
	}

	#description {
		max-width: none;
	}

	#bottom-section {
		width: 100%;
	}

    #add-to-cart-button, #interest-button {
        width: 100%;
    }

	#add-to-cart-section {
		width: 100%;
	}

    #patch-stock {
        width: 50px;
    }

	#production-note {
		max-width: calc(270px - 13px);
	}

	#top-section h2 {
		font-size: 20px;
	}

	#right {
		width: 270px;
	}
}