@import 'global.css';

/* Common styles */
.btnBuy {
	font-weight: 650;
	border-radius: var(--border-radius);
	background-color: rgb(3, 220, 72);
	color: var(--color-primary);
	cursor: pointer;
}

.btnBuy:hover {
	filter: brightness(1.5);
	transition: 0.2s;
	transform: translateY(-4px);
	box-shadow: 0 2px 30px rgba(3, 220, 72, 0.398);
}

a.btnBuy:hover {
	color: inherit;
}

.card2 .btnBuy {
	display: none;
}
/* Layout & Grid */
main > div {
	background-color: rgb(24, 24, 24);
}

#productosSection {
	border-bottom: 0;
	padding: 0;
}

#productosContainer {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
	width: 100%;
	justify-content: center;
	margin: 1rem auto;
	flex: 1;
}

/* Card Styles */
.card2 {
	display: flex;
	flex-direction: column;
	background-color: rgb(8, 8, 8);
	border-radius: var(--border-radius);
	padding: 0.8rem;
	border: 2px solid rgb(5, 5, 5);
	width: 100%;
	height: 100%;
	text-align: center;
	font-size: 0.9em;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
}

.card2:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(255, 255, 255, 0.318);
}

.card2 > img {
	width: 100%;
	align-self: center;
	height: auto;
	object-fit: contain;
	border-radius: var(--border-radius);
	margin-bottom: 1rem;
}

/* Card Details */
.card2__details {
	height: 100%;
	width: 100%;
	justify-content: space-between;
}

.card2__details > h3 {
	font-size: 1.2rem;
	margin-bottom: 1rem;
	line-height: 1.35rem;
	font-style: normal;
	font-weight: 400;
	letter-spacing: 0.25rem;
}

.card2__details > p {
	font-size: 1rem;
}

/* Combo Sections */
.card2__details__combo {
	width: 100%;
	justify-content: flex-end;
	gap: 1rem;
}

.card2__details__combo.horz {
	flex-direction: row-reverse;
}

.card2__details__combo__parent {
	width: 100%;
}

.card2__details__combo__price {
	align-items: flex-end;
	gap: 0.1rem;
}

.card2__details__combo__price > p {
	font-size: 1.2rem;
	text-align: end;
}

.card2__details__combo__price > p:last-of-type {
	font-weight: 600;
}

.card2__details__combo__price > .btnBuy {
	font-size: 1rem;
	letter-spacing: 0.05rem;
	text-align: center;
	width: 80%;
	margin-top: 0.7rem;
	padding: 6px 0px;
}

/* Free Item Styles */
.card2__details__combo__free {
	gap: 0.2rem;
}

.card2__details__combo__free > p,
.modal-free-container p {
	font-size: 0.6rem;
	font-weight: 500;
	text-transform: uppercase;
	color: rgb(0, 255, 106);
}

.card2__details__combo__free > img,
.modal-free-container img {
	border-radius: var(--border-radius);
	object-fit: cover;
}

.card2__details__combo__free > img {
	width: 80px;
	height: 80px;
}

/* Modal Styles */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.846);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	cursor: pointer;
}

.modal.hidden {
	display: none;
}

.modal-content {
	background-color: rgb(12, 12, 12);
	border-radius: var(--border-radius);
	border: 2px solid var(--color-accent);
	padding: 2rem;
	max-width: 1000px;
	width: 90%;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
	cursor: default;
}

.modal-body {
	display: flex;
	gap: 2rem;
	flex-wrap: nowrap;
}

.close-modal {
	position: absolute;
	right: 0.7rem;
	top: 0.3rem;
	font-size: 1.8rem;
	cursor: pointer;
	color: var(--color-accent);
}

.close-modal:hover {
	color: var(--color-secondary);
}

.modal-image {
	max-width: 450px;
	max-height: 450px;
	object-fit: contain;
	border-radius: var(--border-radius);
}

.modal-details {
	flex: 1;
	min-width: 400px;
}

.modal-title {
	font-size: 1.8rem;
	margin-bottom: 1.5rem;
	letter-spacing: 0.2rem;
	font-weight: 500;
	line-height: 2rem;
}

.modal-description {
	font-size: 1rem;
	line-height: 1.3rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 2px solid var(--color-accent);
}

.modal-price-container p {
	font-size: 1.5rem;
	font-weight: 500;
}

/* Modal Flex Layout */
.modal-flex-container {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: flex-start;
	width: 100%;
}

.modal-price-button-container {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.modal-free-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

.modal-free-container p {
	font-size: 1rem;
}

.modal-free-container img {
	width: 120px;
	height: 120px;
}

.modal-buy {
	margin-top: 1rem;
	font-size: 1.1rem;
	padding: 0.8rem 2rem;
	text-align: center;
}

/* Filter Styles */
.filter-top {
	align-self: flex-end;
}

.filter-container {
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

.filter-select {
	padding: 0.5rem;
	border: 1px solid var(--color-accent);
	border-radius: 4px;
	font-size: 1rem;
	cursor: pointer;
}

/* Layout Classes */
.products-layout {
	gap: 2rem;
	width: var(--max-width);
	align-items: normal;
}

.category-menu {
	min-width: 200px;
	background: rgba(53, 53, 53, 0.246);
	border-right: 2px solid var(--color-accent);
	padding-top: 12px;
}

.category-list {
	position: sticky;
	top: 2rem;
}

.category-item {
	padding: 0.8rem 1rem;
	cursor: pointer;
	transition: background-color 0.2s;
}

.category-item:hover {
	background-color: rgba(214, 0, 21, 0.1);
}

.category-item.active {
	background-color: var(--color-accent);
	color: var(--color-secondary);
}

.right-container {
	flex: 1;
	padding: 25px 14px 12px 0px;
	align-items: flex-end;
}

/* Modal Body State */
body.modal-open {
	overflow: hidden;
}

/* Media Queries */
@media (max-width: 1300px) {
	.products-layout {
		gap: 0rem;
		transform: scale(0.75);
		transform-origin: top center;
		width: 118%;
		margin: 0 -9%;
	}
	#productosContainer {
		gap: 1rem;
	}
}

@media (max-width: 1100px) {
	.products-layout {
		transform: scale(0.65);
		width: 133%;
		margin: 0 -16.5%;
	}

	.modal-content {
		transform: scale(0.9);
		width: min-content;
	}
	.modal-body {
		flex-direction: column;
		align-items: center;
	}
	.modal-image {
		width: 70%;
	}
}

@media (max-width: 1000px) {
	.products-layout {
		transform: scale(0.5);
		width: 150%;
		margin: 0 -25%;
	}
}

@media (max-width: 900px) {
	.products-layout {
		transform: scale(0.4);
		width: 167%;
		margin: 0 -33.5%;
	}
}

@media (max-width: 768px) {
	#productosContainer {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.5rem;
	}

	.products-layout {
		transform: scale(0.6);
		width: 125%;
		margin: 0 -33.5%;
	}

	.filter-container {
		flex-direction: column;
	}

	.filter-select {
		width: 100%;
	}

	.category-menu {
		border-right: none;
		border-bottom: 1px solid var(--color-accent);
		padding-bottom: 1rem;
		margin-bottom: 1rem;
	}

	.modal-content {
		width: 80%;
		max-height: 100vh;
	}
	.modal-image {
		width: 80%;
	}

	.modal-details {
		min-width: auto;
	}

	.modal-details p {
		font-size: small !important;
	}
}

@media (max-width: 600px) {
	.products-layout {
		transform: scale(0.6);
		width: 120%;
		margin: 0 -50%;
	}
	#productosContainer {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.5rem;
	}

	.modal-content {
		padding: 1rem;
		width: 85%;
	}

	.modal-body {
		gap: 1rem;
	}

	.modal-title {
		font-size: 1.4rem;
	}
}

@media (max-width: 480px) {
	.products-layout {
		transform: scale(0.4);
		width: 125%;
		margin: 0 -61%;
	}
}

@media (max-width: 400px) {
	.products-layout {
		transform: scale(0.4);
		width: 100%;
		margin: 0 -61%;
	}
}
