/**
 * Peptide Affiliate Products Plugin Styles
 * Renders product cards and sections with custom color schemes
 */

/* Variables - using theme CSS custom properties */
:root {
	--peptide-color-cyan: #00bcd4;
	--peptide-color-cyan-light: #b2ebf2;
	--peptide-color-cyan-dark: #00838f;
	--peptide-color-purple: #9c27b0;
	--peptide-color-purple-light: #e1bee7;
	--peptide-color-purple-dark: #6a1b9a;
	--peptide-color-magenta: #e91e63;
	--peptide-color-magenta-light: #f8bbd0;
	--peptide-color-magenta-dark: #ad1457;
	--peptide-text-primary: #212121;
	--peptide-text-secondary: #666666;
	--peptide-bg-light: #f5f5f5;
	--peptide-border-color: #e0e0e0;
	--peptide-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	--peptide-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ==================== INLINE PRODUCT CARD ==================== */

.peptide-product-inline {
	border: 2px solid var(--peptide-border-color);
	border-radius: 8px;
	padding: 20px;
	margin: 20px 0;
	background-color: #ffffff;
	box-shadow: var(--peptide-shadow);
	transition: all 0.3s ease;
}

.peptide-product-inline:hover {
	box-shadow: var(--peptide-shadow-hover);
	border-color: var(--peptide-color-cyan);
	transform: translateY(-2px);
}

.peptide-inline-content {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.peptide-inline-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 15px;
}

.peptide-inline-title {
	margin: 0;
	font-size: 1.5rem;
	color: var(--peptide-text-primary);
	font-weight: 600;
}

.peptide-inline-price {
	background-color: var(--peptide-color-cyan-light);
	color: var(--peptide-color-cyan-dark);
	padding: 6px 12px;
	border-radius: 20px;
	font-weight: 600;
	white-space: nowrap;
	font-size: 0.9rem;
}

.peptide-inline-description {
	margin: 0;
	color: var(--peptide-text-secondary);
	line-height: 1.6;
	font-size: 0.95rem;
}

.peptide-inline-commission {
	margin: 0;
	color: var(--peptide-text-secondary);
	font-size: 0.85rem;
	font-style: italic;
}

.peptide-inline-cta {
	align-self: flex-start;
	display: inline-block;
	background-color: var(--peptide-color-cyan);
	color: #ffffff;
	padding: 12px 24px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	font-size: 0.95rem;
}

.peptide-inline-cta:hover {
	background-color: var(--peptide-color-cyan-dark);
	text-decoration: none;
	transform: translateX(2px);
}

/* ==================== BOTTOM SECTION ==================== */

.peptide-products-bottom {
	margin: 40px 0;
	padding: 40px 0;
	border-top: 2px solid var(--peptide-border-color);
	border-bottom: 2px solid var(--peptide-border-color);
}

.peptide-products-title {
	text-align: center;
	margin: 0 0 30px 0;
	font-size: 2rem;
	color: var(--peptide-text-primary);
	font-weight: 700;
}

/* ==================== PRODUCT GRID ==================== */

.peptide-products-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 25px;
	margin-bottom: 30px;
}

/* Responsive: tablet view */
@media (max-width: 768px) {
	.peptide-products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

/* Responsive: mobile view */
@media (max-width: 480px) {
	.peptide-products-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
}

/* ==================== PRODUCT CARD ==================== */

.peptide-product-card {
	background-color: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: var(--peptide-shadow);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
	border-top: 4px solid var(--peptide-border-color);
}

.peptide-product-card:hover {
	box-shadow: var(--peptide-shadow-hover);
	transform: translateY(-4px);
}

/* Color-coded cards */
.peptide-product-card.peptide-card-cyan {
	border-top-color: var(--peptide-color-cyan);
}

.peptide-product-card.peptide-card-cyan:hover {
	background-color: var(--peptide-color-cyan-light);
	opacity: 0.95;
}

.peptide-product-card.peptide-card-purple {
	border-top-color: var(--peptide-color-purple);
}

.peptide-product-card.peptide-card-purple:hover {
	background-color: var(--peptide-color-purple-light);
	opacity: 0.95;
}

.peptide-product-card.peptide-card-magenta {
	border-top-color: var(--peptide-color-magenta);
}

.peptide-product-card.peptide-card-magenta:hover {
	background-color: var(--peptide-color-magenta-light);
	opacity: 0.95;
}

/* Card image area */
.peptide-card-image {
	width: 100%;
	height: 200px;
	overflow: hidden;
	background-color: var(--peptide-bg-light);
	display: flex;
	align-items: center;
	justify-content: center;
}

.peptide-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

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

.peptide-card-image-placeholder {
	background: linear-gradient(135deg, var(--peptide-bg-light) 0%, #e8e8e8 100%);
}

.peptide-placeholder-text {
	color: var(--peptide-text-secondary);
	font-size: 0.85rem;
	text-align: center;
}

/* Card content */
.peptide-card-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex-grow: 1;
}

.peptide-card-title {
	margin: 0 0 8px 0;
	font-size: 1.25rem;
	color: var(--peptide-text-primary);
	font-weight: 600;
	line-height: 1.4;
}

.peptide-card-price {
	margin: 0;
	color: var(--peptide-text-secondary);
	font-size: 0.9rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.peptide-card-price strong {
	color: var(--peptide-text-primary);
	font-weight: 600;
}

.peptide-card-commission {
	margin: 0;
	color: var(--peptide-text-secondary);
	font-size: 0.85rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.peptide-card-commission strong {
	color: var(--peptide-text-primary);
	font-weight: 600;
}

.peptide-card-description {
	margin: 0;
	color: var(--peptide-text-secondary);
	font-size: 0.9rem;
	line-height: 1.6;
	flex-grow: 1;
}

.peptide-card-link {
	display: inline-block;
	background-color: var(--peptide-color-cyan);
	color: #ffffff;
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	text-align: center;
	font-size: 0.9rem;
	align-self: flex-start;
	margin-top: 8px;
}

.peptide-card-link:hover {
	background-color: var(--peptide-color-cyan-dark);
	text-decoration: none;
	transform: translateX(2px);
}

/* Color-specific link styles */
.peptide-product-card.peptide-card-cyan .peptide-card-link {
	background-color: var(--peptide-color-cyan);
}

.peptide-product-card.peptide-card-cyan .peptide-card-link:hover {
	background-color: var(--peptide-color-cyan-dark);
}

.peptide-product-card.peptide-card-purple .peptide-card-link {
	background-color: var(--peptide-color-purple);
}

.peptide-product-card.peptide-card-purple .peptide-card-link:hover {
	background-color: var(--peptide-color-purple-dark);
}

.peptide-product-card.peptide-card-magenta .peptide-card-link {
	background-color: var(--peptide-color-magenta);
}

.peptide-product-card.peptide-card-magenta .peptide-card-link:hover {
	background-color: var(--peptide-color-magenta-dark);
}

/* ==================== AFFILIATE DISCLOSURE ==================== */

.peptide-affiliate-disclosure {
	margin-top: 30px;
	padding: 20px;
	background-color: var(--peptide-bg-light);
	border-left: 4px solid var(--peptide-color-cyan);
	border-radius: 4px;
}

.peptide-affiliate-disclosure p {
	margin: 0;
	color: var(--peptide-text-secondary);
	font-size: 0.85rem;
	line-height: 1.6;
	font-style: italic;
}

/* ==================== ACCESSIBILITY ==================== */

.peptide-product-card:focus-within,
.peptide-inline-cta:focus,
.peptide-card-link:focus {
	outline: 2px solid var(--peptide-color-cyan);
	outline-offset: 2px;
}

/* Ensure proper contrast for text */
@media (prefers-contrast: more) {
	.peptide-inline-title,
	.peptide-products-title,
	.peptide-card-title {
		font-weight: 700;
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.peptide-product-inline,
	.peptide-product-card {
		background-color: #2a2a2a;
	}

	.peptide-inline-title,
	.peptide-products-title,
	.peptide-card-title {
		color: #ffffff;
	}

	.peptide-inline-description,
	.peptide-inline-commission,
	.peptide-card-price,
	.peptide-card-commission,
	.peptide-card-description,
	.peptide-affiliate-disclosure p,
	.peptide-text-secondary {
		color: #b0b0b0;
	}

	.peptide-affiliate-disclosure {
		background-color: #1a1a1a;
		border-left-color: var(--peptide-color-cyan);
	}

	.peptide-card-image {
		background-color: #1a1a1a;
	}

	.peptide-placeholder-text {
		color: #666666;
	}
}
