/* =========================================================
   Peptide COA Manager - Frontend Styles
   Yahan se aap grid, cards, badge aur buttons ki styling
   apni marzi se customize kar sakte hain.
   ========================================================= */

.pcoa-wrapper {
	width: 100%;
}

/* Search bar - grid ke upar, ek hi pill-shaped box (icon + input dono ander) */
.pcoa-search-wrap {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	width: 100% !important;
	max-width: 380px !important;
	margin: 0 auto 30px auto !important;
	padding: 11px 18px !important;
	background: #ffffff !important;
	border: 1px solid #dddddd !important;
	border-radius: 30px !important;
	box-sizing: border-box !important;
	box-shadow: none !important;
	transition: border-color 0.15s ease;
}

.pcoa-search-wrap:focus-within {
	border-color: #2563eb !important;
}

.pcoa-search-icon {
	display: flex !important;
	flex-shrink: 0 !important;
	line-height: 0 !important;
}

.pcoa-search-input {
	flex: 1 !important;
	min-width: 0 !important;
	width: 100% !important;
	height: auto !important;
	padding: 0 !important;
	margin: 0 !important;
	font-size: 14px !important;
	color: #333333 !important;
	background: transparent !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.pcoa-search-input::placeholder {
	color: #999999;
}

@media (max-width: 576px) {
	.pcoa-search-wrap {
		max-width: 100% !important;
	}
}

.pcoa-grid-container.pcoa-loading {
	opacity: 0.5;
}

.pcoa-no-results {
	text-align: center;
	color: #999999;
	padding: 40px 0;
	font-size: 14px;
}

.pcoa-grid {
	display: grid;
	grid-template-columns: repeat(var(--pcoa-columns, 4), 1fr);
	gap: 24px;
	margin: 20px 0;
}

@media (max-width: 992px) {
	.pcoa-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
	.pcoa-grid { grid-template-columns: 1fr; }
}

/* Row layout — [peptide_coa layout="row"] aur single product page ke liye.
   1 row me 1 hi COA: left side title/batch/button, right side bordered
   image box. Dark card ki bajaye sirf border wala light card. */
.pcoa-grid-row {
	grid-template-columns: 1fr !important;
	gap: 16px;
}

.pcoa-item.pcoa-item-row {
	background: transparent;
	border: 1px solid #dddddd;
	flex-direction: row;
	align-items: stretch;
	text-align: left;
	padding: 18px 20px;
	gap: 24px;
}

.pcoa-row-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
}

.pcoa-item-row .pcoa-title {
	padding: 0;
	margin-bottom: 0;
	font-size: 19px;
	color: #1a1a1a;
}

.pcoa-badge-inline {
	font-size: 13px;
	font-weight: 600;
	color: #666666;
}

.pcoa-badge-inline span {
	font-weight: 700;
	color: #1a1a1a;
}

.pcoa-item-row .pcoa-buttons {
	flex-direction: row;
	width: auto;
	margin-top: 6px;
	padding: 0;
}

.pcoa-item-row .pcoa-btn-view-coa {
	background: transparent;
	color: #1a1a1a;
	border: 2px solid #1a1a1a;
	padding: 9px 20px;
}

.pcoa-item-row .pcoa-btn-view-coa:hover {
	background: #1a1a1a;
	color: #ffffff;
}

.pcoa-row-image {
	flex-shrink: 0;
	width: 130px;
	height: 130px;
	border: 2px solid #dddddd;
	border-radius: 10px;
	overflow: hidden;
	background: #fafafa;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pcoa-row-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Mobile par bhi wahi row layout (left content / right image) rehta hai,
   sirf compact/chota kar diya jata hai — taake page par baki content ke
   liye jagah bache. */
@media (max-width: 576px) {
	.pcoa-grid-row {
		gap: 10px;
	}

	.pcoa-item.pcoa-item-row {
		padding: 10px 12px;
		gap: 12px;
		border-radius: 8px;
	}

	.pcoa-row-content {
		gap: 4px;
	}

	.pcoa-item-row .pcoa-title {
		font-size: 14px;
		line-height: 1.3;
	}

	.pcoa-badge-inline {
		font-size: 11px;
	}

	.pcoa-item-row .pcoa-buttons {
		margin-top: 4px;
	}

	.pcoa-item-row .pcoa-btn-view-coa {
		padding: 6px 14px;
		font-size: 11px;
		border-width: 1px;
	}

	.pcoa-row-image {
		width: 64px;
		height: 64px;
		border-radius: 6px;
	}
}

/* "Show 2, then Show More" — baki COA is class ke sath hidden rehti hain
   jab tak button click na ho. */
.pcoa-item-hidden {
	display: none !important;
}

.pcoa-show-more-wrap {
	text-align: center;
	margin-top: 16px;
}

.pcoa-show-more-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	color: #1a1a1a;
	border: 1px solid #1a1a1a;
	border-radius: 25px;
	padding: 9px 22px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.pcoa-show-more-btn:hover {
	background: #1a1a1a;
	color: #ffffff;
}

@media (max-width: 576px) {
	.pcoa-show-more-wrap {
		margin-top: 10px;
	}

	.pcoa-show-more-btn {
		padding: 7px 18px;
		font-size: 12px;
	}
}

.pcoa-item {
	background: #2a2a2a;
	border: 1px solid #404040;
	border-radius: 12px;
	padding: 0;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow: hidden;
}

/* Single product page par khud-ba-khud show hone wala COA section */
.pcoa-product-coa-section {
	margin: 40px 0;
}

.pcoa-product-coa-title {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 18px;
}

.pcoa-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 0;
	margin-bottom: 0;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.pcoa-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pcoa-image-placeholder {
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 10px, #e8e8e8 10px, #e8e8e8 20px);
}

/* Badge Label - Batch No: format - image ke bottom pe positioned */
.pcoa-badge-label {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	color: #ffffff;
	background: rgba(0, 0, 0, 0.7);
	padding: 8px 16px;
	border-radius: 25px;
	z-index: 10;
	white-space: nowrap;
}

.pcoa-badge-label span {
	font-weight: 700;
}

.pcoa-title {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 14px;
	color: #ffffff;
	padding: 16px 18px 0 18px;
}

/* Buttons - card ke neeche */
.pcoa-buttons {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	margin-top: auto;
	padding: 0 18px 18px 18px;
	margin-top: 14px;
}

.pcoa-btn,
.pcoa-btn:link,
.pcoa-btn:visited {
	display: inline-block;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	text-align: center;
	border: none;
	cursor: pointer;
	background: none;
	color: inherit;
}

.pcoa-btn-view-coa {
	background: #ffffff;
	color: #1a1a1a;
	font-weight: 700;
	border-radius: 25px;
	padding: 12px 20px;
}

.pcoa-btn-view-coa:hover {
	background: #f0f0f0;
	color: #1a1a1a;
	text-decoration: none !important;
}

.pcoa-no-coa {
	font-size: 12px;
	color: #999999;
	font-style: italic;
}

/* Modal Styles */
.pcoa-modal {
	display: none;
	position: fixed;
	z-index: 99999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	overflow: hidden;
}

.pcoa-modal.show {
	display: flex;
	align-items: center;
	justify-content: center;
}

.pcoa-modal-content {
	position: relative;
	background-color: transparent;
	margin: auto;
	max-width: 95%;
	max-height: 95vh;
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
}

.pcoa-modal-body {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	max-height: 95vh;
	width: 100%;
}

.pcoa-modal-body img {
	max-width: 95vw;
	max-height: 95vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 0;
}

.pcoa-modal-close {
	position: fixed;
	right: 25px;
	top: 25px;
	color: #ffffff;
	font-size: 42px;
	font-weight: bold;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 100000;
	transition: color 0.3s ease;
	line-height: 1;
	padding: 0;
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pcoa-modal-close:hover,
.pcoa-modal-close:focus {
	color: #cccccc;
}

@media (max-width: 768px) {
	.pcoa-modal-content {
		max-width: 100%;
		max-height: 100vh;
	}

	.pcoa-modal-body {
		padding: 0;
	}

	.pcoa-modal-close {
		right: 15px;
		top: 15px;
		font-size: 36px;
		width: 45px;
		height: 45px;
	}

	.pcoa-item {
		margin: 0 auto;
	}
}
