/* ==========================================================================
   New Syed Pharma Products Manager — Public Stylesheet (v2, brand redesign)
   Matches the site's established design system: Fraunces headings, Inter
   body copy, green/gold accents. Each division (Herbal, Veterinary, and any
   future one) keeps its own --nspm-accent color via inline CSS var, set per
   template — only the shared visual language changes here.
   ========================================================================== */

.nspm-products-grid,
.nspm-archive-wrap,
.nspm-single,
.nspm-popup,
.nspm-archive-hero,
.nspm-view-all-wrap {
	font-family: 'Inter', Arial, sans-serif;
}

.nspm-archive-title,
.nspm-single-title,
.nspm-tab-section h2,
.nspm-related-products h2,
.nspm-popup h3 {
	font-family: 'Fraunces', Georgia, serif;
}

/* ===== PRODUCT GRID ===== */
.nspm-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin: 24px 0;
	transition: opacity 0.2s ease;
}

.nspm-products-grid.nspm-grid-loading {
	opacity: 0.4;
	pointer-events: none;
}

.nspm-card {
	--nspm-accent: #007518;
	background: #fff;
	border: 1px solid #eaf3ec;
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	display: flex;
	flex-direction: column;
	position: relative;
}

.nspm-card::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
	background: var(--nspm-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease;
	z-index: 2;
}

.nspm-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 40px rgba(7, 61, 20, 0.12);
	border-color: transparent;
}

.nspm-card:hover::before {
	transform: scaleX(1);
}

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

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

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

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

.nspm-card-thumb-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.35) 100%);
	opacity: 0;
	transition: opacity 0.25s ease;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding-bottom: 14px;
}

.nspm-card:hover .nspm-card-thumb-overlay {
	opacity: 1;
}

.nspm-card-view-icon {
	background: rgba(255,255,255,0.94);
	color: #073d14;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	transform: translateY(8px);
	transition: transform 0.25s ease;
}

.nspm-card:hover .nspm-card-view-icon {
	transform: translateY(0);
}

.nspm-badge-featured {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	background: #ffd166;
	color: #073d14;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 20px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.nspm-badge-gallery {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	background: rgba(7,61,20,0.65);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 9px;
	border-radius: 20px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	backdrop-filter: blur(2px);
}

.nspm-badge-gallery .dashicons {
	font-size: 13px;
	width: 13px;
	height: 13px;
}

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

.nspm-card-division-tag {
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--nspm-accent);
}

.nspm-card-title {
	font-size: 16.5px;
	font-weight: 600;
	margin: 0;
	line-height: 1.35;
}

.nspm-card-title a {
	color: #073d14;
	text-decoration: none;
}

.nspm-card-title a:hover {
	color: var(--nspm-accent);
}

.nspm-card-excerpt {
	font-size: 13.5px;
	color: #5a5a5a;
	margin: 0;
	flex: 1;
	line-height: 1.6;
}

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

/* ===== BUTTONS ===== */
.nspm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	padding: 11px 16px;
	border-radius: 9px;
	text-decoration: none;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: all 0.2s ease;
	flex: 1;
}

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

.nspm-btn-whatsapp:hover {
	background: #1ebc5a;
	color: #fff;
}

.nspm-btn-outline {
	background: transparent;
	color: var(--nspm-accent, #007518);
	border-color: var(--nspm-accent, #007518);
}

.nspm-btn-outline:hover {
	background: var(--nspm-accent, #007518);
	color: #fff;
}

.nspm-btn-primary {
	background: #073d14;
	color: #fff;
}

.nspm-btn-primary:hover {
	background: var(--nspm-accent, #0a4d1a);
	color: #fff;
}

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

/* ===== ARCHIVE HERO + FILTERS ===== */
.nspm-archive-hero {
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	background: linear-gradient(180deg, #073d14 0%, #0a4d1a 100%);
	padding: 64px 24px 48px;
	text-align: center;
}

.nspm-archive-hero .nspm-eyebrow {
	color: #8fd39f;
	font-weight: 700;
	font-size: 12.5px;
	letter-spacing: 2px;
	text-transform: uppercase;
	margin-bottom: 14px;
	display: block;
}

.nspm-archive-hero .nspm-archive-title {
	color: #ffffff;
	font-size: 34px;
	font-weight: 600;
	margin: 0;
	padding: 0;
}

.nspm-archive-hero .nspm-archive-title::after {
	display: none;
}

.nspm-archive-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 16px 60px;
}

.nspm-archive-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: -20px auto 34px;
	max-width: 1000px;
	background: #ffffff;
	border: 1px solid #eaf3ec;
	border-radius: 16px;
	padding: 16px;
	box-shadow: 0 14px 34px rgba(7, 61, 20, 0.08);
	position: relative;
	z-index: 3;
}

.nspm-archive-filters input[type="search"],
.nspm-archive-filters select {
	padding: 11px 14px;
	border: 1.5px solid #dcefe0;
	border-radius: 9px;
	font-size: 13.5px;
	font-family: 'Inter', Arial, sans-serif;
	color: #073d14;
	background: #fbfdfb;
	flex: 1;
	min-width: 160px;
}

.nspm-archive-filters input[type="search"]:focus,
.nspm-archive-filters select:focus {
	outline: none;
	border-color: var(--nspm-accent, #007518);
}

.nspm-archive-filters .nspm-btn {
	flex: none;
	padding: 11px 24px;
}

.nspm-pagination,
.nspm-grid-pagination {
	display: flex;
	gap: 6px;
	justify-content: center;
	align-items: center;
	margin-top: 32px;
	flex-wrap: wrap;
}

.nspm-pagination .page-numbers,
.nspm-grid-pagination button {
	padding: 9px 15px;
	border: 1.5px solid #dcefe0;
	border-radius: 8px;
	text-decoration: none;
	color: #073d14;
	font-size: 13.5px;
	font-weight: 600;
	font-family: 'Inter', Arial, sans-serif;
	background: #ffffff;
	cursor: pointer;
	transition: all 0.2s ease;
}

.nspm-pagination .page-numbers:hover,
.nspm-grid-pagination button:hover {
	border-color: var(--nspm-accent, #007518);
	color: var(--nspm-accent, #007518);
}

.nspm-pagination .page-numbers.current,
.nspm-grid-pagination button.is-active {
	background: var(--nspm-accent, #007518);
	color: #fff;
	border-color: var(--nspm-accent, #007518);
}

.nspm-grid-pagination button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.nspm-no-products {
	grid-column: 1 / -1;
	text-align: center;
	color: #8a9a8e;
	padding: 30px 0;
}

/* ===== "VIEW ALL" BUTTON (Elementor widget) ===== */
.nspm-view-all-wrap {
	text-align: center;
	margin-top: 30px;
}

.nspm-view-all-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	font-weight: 700;
	font-size: 13.5px;
	color: #ffffff;
	background: #073d14;
	padding: 13px 30px;
	border-radius: 30px;
	transition: background 0.2s ease, transform 0.2s ease;
}

.nspm-view-all-btn:hover {
	background: var(--nspm-accent, #0a4d1a);
	transform: translateY(-2px);
	color: #ffffff;
}

/* ===== SINGLE PRODUCT PAGE ===== */
.nspm-single {
	max-width: 1100px;
	margin: 0 auto;
	padding: 40px 16px 100px;
}

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

.nspm-main-image {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: #f7faf7;
	border: 1px solid #eaf3ec;
	cursor: zoom-in;
}

.nspm-main-image-img {
	width: 100%;
	display: block;
	object-fit: cover;
	aspect-ratio: 1 / 1;
	transition: transform 0.4s ease, opacity 0.15s ease;
}

.nspm-main-image:hover .nspm-main-image-img {
	transform: scale(1.04);
}

.nspm-main-image-placeholder {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: linear-gradient(135deg, #e3f2e6, #f7faf7);
}

.nspm-zoom-hint {
	position: absolute;
	bottom: 14px;
	right: 14px;
	background: rgba(7,61,20,0.7);
	color: #fff;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.nspm-main-image:hover .nspm-zoom-hint {
	opacity: 1;
}

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

.nspm-gallery-thumb-btn {
	padding: 0;
	border: 2px solid #eaf3ec;
	border-radius: 10px;
	background: none;
	cursor: pointer;
	overflow: hidden;
	width: 70px;
	height: 70px;
	flex-shrink: 0;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.nspm-gallery-thumb-btn:hover {
	transform: translateY(-2px);
}

.nspm-gallery-thumb-btn.is-active {
	border-color: var(--nspm-accent, #007518);
}

.nspm-gallery-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nspm-category-badge {
	display: inline-block;
	background: #e3f2e6;
	color: var(--nspm-accent, #007518);
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 5px 13px;
	border-radius: 20px;
	margin-bottom: 12px;
}

/* Fullscreen image lightbox */
.nspm-lightbox-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(5, 20, 8, 0.94);
	z-index: 999999;
	align-items: center;
	justify-content: center;
}

.nspm-lightbox-overlay.is-active {
	display: flex;
}

.nspm-lightbox-overlay img {
	max-width: 88vw;
	max-height: 84vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.5);
	transition: opacity 0.15s ease;
}

.nspm-lightbox-close {
	position: absolute;
	top: 22px;
	right: 26px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255,255,255,0.14);
	color: #fff;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.nspm-lightbox-close:hover {
	background: rgba(255,255,255,0.26);
}

.nspm-lightbox-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: rgba(255,255,255,0.14);
	color: #fff;
	border: none;
	font-size: 26px;
	cursor: pointer;
}

.nspm-lightbox-arrow:hover {
	background: rgba(255,255,255,0.26);
}

.nspm-lightbox-prev { left: 22px; }
.nspm-lightbox-next { right: 22px; }

@media (max-width: 640px) {
	.nspm-lightbox-arrow { width: 40px; height: 40px; font-size: 20px; }
	.nspm-lightbox-prev { left: 8px; }
	.nspm-lightbox-next { right: 8px; }
	.nspm-lightbox-close { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 20px; }
}

.nspm-single-title {
	margin: 0 0 12px;
	font-size: 28px;
	font-weight: 600;
	color: #073d14;
	line-height: 1.3;
}

.nspm-single-short-desc {
	color: #5a5a5a;
	font-size: 15px;
	line-height: 1.75;
	margin-bottom: 24px;
}

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

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

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

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

.nspm-tab-section h2 {
	margin-top: 0;
	font-size: 19px;
	color: #073d14;
	font-weight: 600;
}

.nspm-tab-content {
	font-size: 14px;
	color: #5a5a5a;
	line-height: 1.8;
}

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

.nspm-related-products h2 {
	font-size: 21px;
	color: #073d14;
	font-weight: 600;
	margin-bottom: 20px;
}

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

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

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

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

/* ===== POPUP FORM ("Request Information") ===== */
.nspm-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(7, 61, 20, 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: 16px;
	padding: 30px;
	max-width: 440px;
	width: 100%;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 24px 60px rgba(0,0,0,0.25);
}

.nspm-popup h3 {
	font-size: 19px;
	color: #073d14;
	font-weight: 600;
	margin: 0 0 18px;
	padding-right: 20px;
}

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

.nspm-popup-close:hover {
	color: #073d14;
}

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

.nspm-form-row label {
	font-size: 12.5px;
	font-weight: 700;
	color: #073d14;
}

.nspm-form-row input,
.nspm-form-row textarea {
	padding: 11px 13px;
	border: 1.5px solid #dcefe0;
	border-radius: 9px;
	font-size: 13.5px;
	font-family: 'Inter', Arial, sans-serif;
	width: 100%;
	box-sizing: border-box;
	color: #073d14;
	background: #fbfdfb;
}

.nspm-form-row input:focus,
.nspm-form-row textarea:focus {
	outline: none;
	border-color: #007518;
	background: #ffffff;
}

.nspm-form-row input:disabled {
	color: #8a9a8e;
	background: #f2f5f2;
}

.nspm-form-feedback {
	font-size: 12.5px;
	margin-bottom: 10px;
	font-weight: 600;
}

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

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

/* ===== SEARCH WIDGET ===== */
.nspm-search-form {
	display: flex;
	gap: 8px;
}

.nspm-search-input {
	flex: 1;
	padding: 11px 14px;
	border: 1.5px solid #dcefe0;
	border-radius: 9px;
	font-family: 'Inter', Arial, sans-serif;
	font-size: 13.5px;
}

.nspm-search-submit {
	padding: 11px 20px;
	border-radius: 9px;
	border: none;
	background: #073d14;
	color: #fff;
	font-weight: 700;
	font-size: 13.5px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.nspm-search-submit:hover {
	background: #0a4d1a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
	.nspm-archive-hero { padding: 50px 20px 40px; }
	.nspm-archive-hero .nspm-archive-title { font-size: 26px; }
	.nspm-archive-filters { margin: -16px 16px 30px; }
	.nspm-single-title { font-size: 23px; }
}
