/**
 * BeatStars Grid Widget Styles
 * Professional beat store grid with hover effects and animations
 */

/* Container */
.beat-grid-container {
	width: 100%;
	padding: 20px 0;
}

/* Grid Layout */
.beat-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 20px;
	width: 100%;
}

.beat-grid.beat-grid-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.beat-grid.beat-grid-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.beat-grid.beat-grid-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

.beat-grid.beat-grid-cols-5 {
	grid-template-columns: repeat(5, 1fr);
}

.beat-grid.beat-grid-cols-6 {
	grid-template-columns: repeat(6, 1fr);
}

/* Card */
.beat-card {
	background-color: #1a1a1a;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.beat-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 24px rgba(0, 212, 255, 0.2);
}

/* Card Image */
.beat-card-image {
	position: relative;
	width: 100%;
	height: 250px;
	overflow: hidden;
	background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.beat-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
	border-radius: 6px;
}

.beat-card:hover .beat-card-image img {
	transform: scale(1.05);
}

/* Player Overlay */
.beat-card-player-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	backdrop-filter: blur(2px);
}

.beat-card:hover .beat-card-player-overlay {
	opacity: 1;
}

.beat-card-player {
	width: 90%;
	background: rgba(0, 0, 0, 0.9);
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #00d4ff;
}

.beat-card-player audio {
	width: 100%;
	height: 30px;
}

/* Card Content */
.beat-card-content {
	padding: 15px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

/* Title */
.beat-card-title {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: 600;
	color: #ffffff;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	transition: color 0.3s ease;
}

.beat-card:hover .beat-card-title {
	color: #00d4ff;
}

/* Artist */
.beat-card-artist {
	margin: 0 0 10px 0;
	font-size: 13px;
	color: #999999;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Metadata Badges */
.beat-card-metadata {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.beat-meta-badge {
	display: inline-block;
	background: rgba(0, 212, 255, 0.1);
	color: #00d4ff;
	font-size: 11px;
	padding: 4px 8px;
	border-radius: 4px;
	border: 1px solid rgba(0, 212, 255, 0.3);
	font-weight: 500;
	white-space: nowrap;
	transition: all 0.3s ease;
}

.beat-card:hover .beat-meta-badge {
	background: rgba(0, 212, 255, 0.2);
	border-color: #00d4ff;
}

/* Footer */
.beat-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
}

/* Price */
.beat-card-price {
	font-size: 16px;
	font-weight: 700;
	color: #00d4ff;
	white-space: nowrap;
}

.beat-card-price .woocommerce-Price-amount {
	color: #00d4ff;
	font-weight: 700;
}

.beat-card-price .woocommerce-Price-currencySymbol {
	font-size: 14px;
}

/* Button */
.beat-card-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	background-color: #00d4ff;
	color: #000000;
	text-decoration: none;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
	flex-shrink: 0;
}

.beat-card-button:hover {
	background-color: #00a8cc;
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.beat-card-button:active {
	transform: scale(0.98);
}

/* Pagination */
.beat-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 40px;
	gap: 10px;
}

.beat-pagination a,
.beat-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	background-color: #1a1a1a;
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	border: 1px solid #333333;
	font-size: 14px;
	transition: all 0.3s ease;
}

.beat-pagination a:hover {
	background-color: #00d4ff;
	color: #000000;
	border-color: #00d4ff;
}

.beat-pagination .current {
	background-color: #00d4ff;
	color: #000000;
	border-color: #00d4ff;
	font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1400px) {
	.beat-grid.beat-grid-cols-6 {
		grid-template-columns: repeat(5, 1fr);
	}

	.beat-grid.beat-grid-cols-5 {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 1024px) {
	.beat-grid.beat-grid-cols-6 {
		grid-template-columns: repeat(4, 1fr);
	}

	.beat-grid.beat-grid-cols-5 {
		grid-template-columns: repeat(3, 1fr);
	}

	.beat-grid.beat-grid-cols-4 {
		grid-template-columns: repeat(3, 1fr);
	}

	.beat-card-image {
		height: 200px;
	}

	.beat-card-title {
		font-size: 15px;
	}
}

@media (max-width: 768px) {
	.beat-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 15px;
	}

	.beat-grid.beat-grid-cols-2 {
		grid-template-columns: repeat(2, 1fr);
	}

	.beat-grid.beat-grid-cols-3 {
		grid-template-columns: repeat(2, 1fr);
	}

	.beat-grid.beat-grid-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.beat-grid.beat-grid-cols-5 {
		grid-template-columns: repeat(2, 1fr);
	}

	.beat-grid.beat-grid-cols-6 {
		grid-template-columns: repeat(2, 1fr);
	}

	.beat-card-image {
		height: 180px;
	}

	.beat-card-content {
		padding: 12px;
	}

	.beat-card-title {
		font-size: 14px;
	}

	.beat-card-price {
		font-size: 14px;
	}

	.beat-card-button {
		padding: 6px 12px;
		font-size: 12px;
	}
}

@media (max-width: 480px) {
	.beat-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.beat-grid.beat-grid-cols-2 {
		grid-template-columns: repeat(2, 1fr);
	}

	.beat-grid.beat-grid-cols-3 {
		grid-template-columns: repeat(2, 1fr);
	}

	.beat-grid.beat-grid-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.beat-grid.beat-grid-cols-5 {
		grid-template-columns: repeat(2, 1fr);
	}

	.beat-grid.beat-grid-cols-6 {
		grid-template-columns: repeat(2, 1fr);
	}

	.beat-card-image {
		height: 150px;
	}

	.beat-card-content {
		padding: 10px;
	}

	.beat-card-title {
		font-size: 13px;
		margin-bottom: 6px;
	}

	.beat-card-artist {
		font-size: 12px;
		margin-bottom: 6px;
	}

	.beat-card-metadata {
		margin-bottom: 8px;
	}

	.beat-meta-badge {
		font-size: 10px;
		padding: 3px 6px;
	}

	.beat-card-footer {
		gap: 6px;
	}

	.beat-card-price {
		font-size: 13px;
	}

	.beat-card-button {
		padding: 5px 10px;
		font-size: 11px;
	}

	.beat-pagination a,
	.beat-pagination span {
		min-width: 36px;
		height: 36px;
		font-size: 12px;
	}
}

/* Loading Animation */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.beat-card {
	animation: fadeIn 0.5s ease forwards;
}

.beat-card:nth-child(1) {
	animation-delay: 0.05s;
}

.beat-card:nth-child(2) {
	animation-delay: 0.1s;
}

.beat-card:nth-child(3) {
	animation-delay: 0.15s;
}

.beat-card:nth-child(4) {
	animation-delay: 0.2s;
}

.beat-card:nth-child(5) {
	animation-delay: 0.25s;
}

.beat-card:nth-child(n+6) {
	animation-delay: 0.3s;
}

/* No products message */
.beat-grid-container p {
	text-align: center;
	color: #999999;
	font-size: 16px;
	padding: 40px 20px;
}
