/* ==========================================================================
   New Syed Pharma Products Manager - Public Stylesheet
   ========================================================================== */

.nspm-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin: 24px 0;
}

.nspm-card {
	background: #fff;
	border: 1px solid #e7e7e7;
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
}

.nspm-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.nspm-card-thumb {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f4f6f5;
}

.nspm-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.nspm-card:hover .nspm-card-thumb img {
	transform: scale(1.05);
}

.nspm-card-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e8f5ee, #f3f3f3);
}

.nspm-badge-featured {
	position: absolute;
	top: 10px;
	left: 10px;
	background: #1f8f4e;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 20px;
}

.nspm-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.nspm-card-title {
	font-size: 17px;
	margin: 0;
	line-height: 1.3;
}

.nspm-card-title a {
	color: #1b1b1b;
	text-decoration: none;
}

.nspm-card-excerpt {
	font-size: 14px;
	color: #5f5f5f;
	margin: 0;
	flex: 1;
}

.nspm-card-actions {
	display: flex;
	gap: 8px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.nspm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 14px;
	border-radius: 8px;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: opacity 0.2s ease, background 0.2s ease;
	flex: 1;
}

.nspm-btn-whatsapp {
	background: #25d366;
	color: #fff;
}

.nspm-btn-whatsapp:hover {
	opacity: 0.9;
	color: #fff;
}

.nspm-btn-outline {
	background: transparent;
	color: #1f8f4e;
	border-color: #1f8f4e;
}

.nspm-btn-outline:hover {
	background: #1f8f4e;
	color: #fff;
}

.nspm-btn-primary {
	background: #1f8f4e;
	color: #fff;
}

.nspm-btn-primary:hover {
	opacity: 0.9;
	color: #fff;
}

.nspm-btn-block {
	width: 100%;
}

/* Archive filters */
.nspm-archive-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 16px;
}

.nspm-archive-title {
	margin-bottom: 16px;
}

.nspm-archive-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}

.nspm-archive-filters input[type="search"],
.nspm-archive-filters select {
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
}

.nspm-pagination {
	display: flex;
	gap: 6px;
	justify-content: center;
	margin-top: 24px;
}

.nspm-pagination .page-numbers {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	text-decoration: none;
	color: #333;
}

.nspm-pagination .page-numbers.current {
	background: #1f8f4e;
	color: #fff;
	border-color: #1f8f4e;
}

.nspm-no-products {
	grid-column: 1 / -1;
	text-align: center;
	color: #777;
}

/* Single product page */
.nspm-single {
	max-width: 1100px;
	margin: 0 auto;
	padding: 32px 16px 100px;
}

.nspm-single-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	align-items: start;
}

.nspm-main-image img {
	width: 100%;
	border-radius: 12px;
	object-fit: cover;
}

.nspm-thumb-row {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.nspm-gallery-thumb {
	width: 70px;
	height: 70px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid #ddd;
	cursor: pointer;
}

.nspm-category-badge {
	display: inline-block;
	background: #eef7f0;
	color: #1f8f4e;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 20px;
	margin-bottom: 8px;
}

.nspm-single-title {
	margin: 0 0 12px;
}

.nspm-single-short-desc {
	color: #555;
	font-size: 16px;
	margin-bottom: 20px;
}

.nspm-single-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.nspm-single-actions .nspm-btn,
.nspm-single-actions button.nspm-btn {
	flex: none;
	padding: 12px 20px;
}

.nspm-single-tabs {
	margin-top: 48px;
}

.nspm-tab-section {
	border-top: 1px solid #eee;
	padding: 24px 0;
}

.nspm-tab-section h2 {
	margin-top: 0;
}

.nspm-related-products {
	margin-top: 48px;
}

/* Sticky action bar (mobile-first ordering buttons) */
.nspm-sticky-actions {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	display: none;
	gap: 10px;
	padding: 10px 16px;
	background: #fff;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
	z-index: 9999;
}

@media (max-width: 768px) {
	.nspm-single-grid {
		grid-template-columns: 1fr;
	}

	.nspm-sticky-actions {
		display: flex;
	}

	.nspm-sticky-actions .nspm-btn {
		flex: 1;
	}
}

/* Popup form */
.nspm-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 16px;
}

.nspm-popup-overlay[hidden] {
	display: none;
}

.nspm-popup {
	background: #fff;
	border-radius: 12px;
	padding: 28px;
	max-width: 420px;
	width: 100%;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
}

.nspm-popup-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #888;
}

.nspm-form-row {
	margin-bottom: 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nspm-form-row label {
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.nspm-form-row input,
.nspm-form-row textarea {
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	width: 100%;
	box-sizing: border-box;
}

.nspm-form-feedback {
	font-size: 13px;
	margin-bottom: 10px;
}

.nspm-form-feedback.nspm-success {
	color: #1f8f4e;
}

.nspm-form-feedback.nspm-error {
	color: #c0392b;
}

/* Search widget */
.nspm-search-form {
	display: flex;
	gap: 8px;
}

.nspm-search-input {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
}

.nspm-search-submit {
	padding: 10px 16px;
	border-radius: 8px;
	border: none;
	background: #1f8f4e;
	color: #fff;
	cursor: pointer;
}
