/**
 * Elavar Peptide Product System — Premium Frontend Styles
 * Design reference: PT-141 / HydraMed card UI
 */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
	--ep-primary      : #1a6dca;
	--ep-primary-dark : #1558a8;
	--ep-primary-lite : #e8f2ff;
	--ep-bg           : #f0f4f8;
	--ep-white        : #ffffff;
	--ep-text         : #1a2332;
	--ep-muted        : #5a6a7e;
	--ep-border       : #dde6ef;
	--ep-card-border  : #d0dbe8;
	--ep-img-border   : #c8d8eb;
	--ep-img-bg       : #f7fafd;
	--ep-tag-border   : #b8cde0;
	--ep-tag-color    : #3d5a72;
	--ep-r-card       : 16px;
	--ep-r-img        : 12px;
	--ep-r-btn        : 10px;
	--ep-shadow       : 0 2px 12px rgba(20,60,100,.08),0 1px 3px rgba(20,60,100,.05);
	--ep-shadow-h     : 0 8px 32px rgba(20,60,100,.14),0 2px 8px rgba(20,60,100,.07);
	--ep-ease         : 0.22s cubic-bezier(.4,0,.2,1);
	--ep-font         : 'Nunito','Segoe UI',system-ui,-apple-system,sans-serif;
}

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.epps-wrapper {
	background  : var(--ep-bg);
	padding     : 40px 32px;
	font-family : var(--ep-font);
	color       : var(--ep-text);
	box-sizing  : border-box;
}
.epps-wrapper *, .epps-wrapper *::before, .epps-wrapper *::after { box-sizing: border-box; }

/* ── Controls ────────────────────────────────────────────────────────────── */
.epps-controls {
	display       : flex;
	flex-wrap     : wrap;
	align-items   : center;
	gap           : 14px;
	margin-bottom : 32px;
}
.epps-search-wrap { position: relative; flex: 1 1 280px; max-width: 400px; }
.epps-search-icon {
	position: absolute; left: 14px; top: 50%;
	transform: translateY(-50%); color: var(--ep-muted); pointer-events: none;
}
.epps-search {
	width: 100%; padding: 12px 16px 12px 44px;
	border: 1.5px solid var(--ep-border); border-radius: 10px;
	background: var(--ep-white); font-size: 14px;
	font-family: var(--ep-font); color: var(--ep-text);
	transition: border-color var(--ep-ease), box-shadow var(--ep-ease);
}
.epps-search::placeholder { color: #a0adb8; }
.epps-search:focus { outline: none; border-color: var(--ep-primary); box-shadow: 0 0 0 3px rgba(26,109,202,.12); }

.epps-filter-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.epps-filter-btn {
	padding: 8px 18px; border: 1.5px solid var(--ep-border); border-radius: 99px;
	background: var(--ep-white); font-family: var(--ep-font);
	font-size: 13px; font-weight: 600; color: var(--ep-muted);
	cursor: pointer; transition: all var(--ep-ease); white-space: nowrap;
}
.epps-filter-btn:hover { border-color: var(--ep-primary); color: var(--ep-primary); background: var(--ep-primary-lite); }
.epps-filter-btn.active { background: var(--ep-primary); border-color: var(--ep-primary); color: #fff; }

/* ── Grid ────────────────────────────────────────────────────────────────── */
.epps-grid { display: grid; gap: 24px; grid-template-columns: repeat(3,1fr); align-items: start; }
.epps-cols-1 { grid-template-columns: minmax(0,480px); justify-content: center; }
.epps-cols-2 { grid-template-columns: repeat(2,1fr); }
.epps-cols-3 { grid-template-columns: repeat(3,1fr); }
.epps-cols-4 { grid-template-columns: repeat(4,1fr); }

/* ── Card <a> ────────────────────────────────────────────────────────────── */
.epps-card-link {
	background: var(--ep-white);
	border: 1px solid var(--ep-card-border);
	border-radius: var(--ep-r-card);
	box-shadow: var(--ep-shadow);
	display: flex; flex-direction: column;
	text-decoration: none; color: inherit; cursor: pointer;
	transition: transform var(--ep-ease), box-shadow var(--ep-ease), border-color var(--ep-ease);
	overflow: hidden;
}
.epps-card-link:hover, .epps-card-link:focus {
	transform: translateY(-5px);
	box-shadow: var(--ep-shadow-h);
	border-color: #b0c8e0;
	text-decoration: none; color: inherit; outline: none;
}

/* ── Image area ──────────────────────────────────────────────────────────── */
.epps-card-image {
	margin: 14px 14px 0;
	border: 1.5px solid var(--ep-img-border);
	border-radius: var(--ep-r-img);
	background: var(--ep-img-bg);
	aspect-ratio: 4 / 3;
	overflow: hidden;
	position: relative;
}
.epps-card-image img {
	width: 100%; height: 100%;
	object-fit: cover; display: block;
	transition: transform 0.45s ease;
}
.epps-card-link:hover .epps-card-image img { transform: scale(1.05); }

/* Stock badge */
.epps-stock-badge {
	position: absolute; bottom: 10px; left: 10px;
	padding: 4px 10px; border-radius: 99px;
	font-size: 10.5px; font-weight: 700;
	letter-spacing: .4px; text-transform: uppercase;
}
.epps-stock-badge.in-stock {
	background: rgba(26,158,107,.14); color: #0c7a4e;
	border: 1px solid rgba(26,158,107,.28);
}
.epps-stock-badge.out-of-stock {
	background: rgba(192,57,43,.12); color: #a82a1a;
	border: 1px solid rgba(192,57,43,.24);
}

/* ── Body ────────────────────────────────────────────────────────────────── */
.epps-card-body {
	padding: 16px 18px 18px;
	display: flex; flex-direction: column; flex: 1;
}

.epps-card-title {
	margin: 0 0 8px;
	font-size: 20px; font-weight: 800;
	color: var(--ep-primary); line-height: 1.25; letter-spacing: -.2px;
}

.epps-card-desc {
	margin: 0 0 12px;
	font-size: 13.5px; font-weight: 400;
	color: var(--ep-muted); line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Tags — outlined pills exactly like the screenshot */
.epps-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.epps-tag {
	padding: 4px 13px; border-radius: 99px;
	background: transparent; border: 1.5px solid var(--ep-tag-border);
	color: var(--ep-tag-color); font-size: 12px; font-weight: 600;
	transition: all var(--ep-ease);
}
.epps-card-link:hover .epps-tag { border-color: #8aafc8; color: var(--ep-primary); }

/* Thin divider above footer */
.epps-card-divider {
	height: 1px; background: var(--ep-border);
	margin: auto 0 14px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.epps-card-footer {
	display: flex; align-items: center;
	justify-content: space-between; gap: 8px;
}

.epps-price {
	font-size: 18px; font-weight: 800;
	color: var(--ep-primary); white-space: nowrap;
}

.epps-footer-right {
	display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}

/* COA link */
.epps-coa-link {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 12.5px; font-weight: 600;
	color: var(--ep-muted); text-decoration: none;
	white-space: nowrap; transition: color var(--ep-ease);
}
.epps-coa-link:hover { color: var(--ep-primary); }

/* Button — dark blue rounded with arrow */
.epps-btn {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 10px 18px;
	border-radius: var(--ep-r-btn);
	background: var(--ep-primary);
	color: #fff !important;
	font-family: var(--ep-font);
	font-size: 13.5px; font-weight: 700;
	text-decoration: none; border: none; cursor: pointer;
	white-space: nowrap;
	transition: background var(--ep-ease), box-shadow var(--ep-ease);
	letter-spacing: .1px;
}
.epps-btn-arrow { font-style: normal; transition: transform var(--ep-ease); }
.epps-card-link:hover .epps-btn { background: var(--ep-primary-dark); box-shadow: 0 4px 14px rgba(26,109,202,.38); }
.epps-card-link:hover .epps-btn-arrow { transform: translateX(3px); }

.epps-btn-cart { background: #0f8a5a; }
.epps-card-link:hover .epps-btn-cart { background: #0a6e48; }

.epps-out-of-stock .epps-btn { background: #b0bcc8; cursor: not-allowed; pointer-events: none; }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.epps-loading { display: flex; justify-content: center; padding: 40px; }
.epps-spinner {
	width: 36px; height: 36px;
	border: 3px solid var(--ep-border); border-top: 3px solid var(--ep-primary);
	border-radius: 50%; animation: epps-spin 0.7s linear infinite;
}
@keyframes epps-spin { to { transform: rotate(360deg); } }

.epps-no-results {
	grid-column: 1 / -1; text-align: center;
	padding: 60px 0; color: var(--ep-muted); font-size: 15px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1200px) { .epps-cols-4 { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 900px)  { .epps-cols-3, .epps-cols-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px)  {
	.epps-cols-2, .epps-cols-3, .epps-cols-4 { grid-template-columns: 1fr; }
	.epps-wrapper { padding: 24px 16px; }
	.epps-controls { flex-direction: column; align-items: stretch; }
	.epps-search-wrap { max-width: 100%; }
	.epps-card-title { font-size: 18px; }
	.epps-btn { padding: 9px 14px; font-size: 12.5px; }
}
