/* Simple Product Order — admin (Products page) styles */
.spo-admin-wrap {
	--spo-primary: #16a34a;
	--spo-primary-dark: #15803d;
	--spo-text: #1f2937;
	--spo-muted: #6b7280;
	--spo-border: #e5e7eb;
	--spo-bg: #ffffff;
	--spo-radius: 14px;
	max-width: 1100px;
}

.spo-admin-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin: 18px 0 22px;
}
.spo-admin-header h1 {
	margin: 0;
	padding: 0;
	font-size: 23px;
}

/* ---------- Buttons ---------- */
.spo-btn-admin {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	appearance: none;
	border: 1px solid transparent;
	background: #fff;
	color: var(--spo-text);
	font-size: 13.5px;
	font-weight: 600;
	padding: 8px 14px;
	border-radius: 9px;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
	line-height: 1.4;
}
.spo-btn-admin .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}
.spo-btn-admin-primary {
	background: var(--spo-primary);
	border-color: var(--spo-primary);
	color: #fff;
}
.spo-btn-admin-primary:hover {
	background: var(--spo-primary-dark);
	border-color: var(--spo-primary-dark);
	color: #fff;
}
.spo-btn-admin-large { padding: 12px 22px; font-size: 15px; border-radius: 10px; }
.spo-btn-admin-light {
	background: #f3f4f6;
	border-color: #e5e7eb;
	color: var(--spo-text);
}
.spo-btn-admin-light:hover { background: #e5e7eb; color: var(--spo-text); }
.spo-btn-admin-danger {
	background: #fef2f2;
	border-color: #fee2e2;
	color: #dc2626;
	padding: 8px 10px;
}
.spo-btn-admin-danger:hover { background: #fee2e2; }
.spo-btn-admin:active { transform: scale(.98); }

/* ---------- Empty state ---------- */
/* ---------------------------------------------------------------------- */
/*  Search bar + live suggestions (WP-admin Products screen ar frontend    */
/*  Admin Panel — dutoi ei ekhi shared component use kore)                 */
/* ---------------------------------------------------------------------- */
.spo-search-wrap {
	position: relative;
	width: 100%;
	max-width: 360px;
}
.spo-search-box {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--spo-bg);
	border: 1.5px solid var(--spo-border);
	border-radius: 8px;
	padding: 0 10px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.spo-search-box:focus-within {
	border-color: var(--spo-primary);
	box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}
.spo-search-icon {
	flex: 0 0 auto;
	color: var(--spo-muted);
}
.spo-search-input {
	flex: 1 1 auto;
	border: 0;
	outline: 0;
	background: transparent;
	font-size: 14px;
	padding: 9px 8px;
	color: var(--spo-text);
	width: 100%;
	box-shadow: none;
}
.spo-search-input::placeholder { color: #9ca3af; }
.spo-search-clear {
	flex: 0 0 auto;
	border: 0;
	background: #f3f4f6;
	color: var(--spo-muted);
	width: 20px;
	height: 20px;
	border-radius: 50%;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.spo-search-clear:hover { background: #e5e7eb; color: var(--spo-text); }

.spo-search-suggestions {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: var(--spo-bg);
	border: 1px solid var(--spo-border);
	border-radius: 10px;
	box-shadow: 0 14px 34px rgba(0,0,0,.14);
	overflow: hidden;
	z-index: 40;
	max-height: 360px;
	overflow-y: auto;
}
.spo-suggestion-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	cursor: pointer;
	border-bottom: 1px solid #f3f4f6;
}
.spo-suggestion-item:last-child { border-bottom: 0; }
.spo-suggestion-item:hover,
.spo-suggestion-item.is-active {
	background: #f0fdf4;
}
.spo-suggestion-thumb {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	overflow: hidden;
	background: #f3f4f6;
}
.spo-suggestion-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.spo-suggestion-info { flex: 1 1 auto; min-width: 0; }
.spo-suggestion-name {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--spo-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.spo-suggestion-name mark {
	background: rgba(22,163,74,.18);
	color: var(--spo-primary-dark);
	border-radius: 3px;
	padding: 0 1px;
}
.spo-suggestion-price {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 700;
	color: var(--spo-primary-dark);
}
.spo-suggestion-empty {
	padding: 14px 12px;
	font-size: 13px;
	color: var(--spo-muted);
	text-align: center;
}
.spo-search-empty {
	text-align: center;
	color: var(--spo-muted);
	padding: 24px 0;
	font-size: 14px;
}
.spo-p-card.spo-is-hidden { display: none !important; }

.spo-empty-state {
	text-align: center;
	background: #fff;
	border: 1px dashed var(--spo-border);
	border-radius: var(--spo-radius);
	padding: 60px 20px;
	color: var(--spo-muted);
}
.spo-empty-state .dashicons {
	font-size: 42px;
	width: 42px;
	height: 42px;
	color: #d1d5db;
	margin-bottom: 10px;
}
.spo-empty-state p { font-size: 15px; margin: 0 0 18px; }

/* ---------- Product grid (list view) ---------- */
/* auto-fit + minmax: jokhoni product add hoy, grid nijei recalculate kore
   optimal column count ber kore — kono product er count na dhorei, ar
   choto phone theke boro desktop, shob device e nijer moto sundor sajano
   thake, kono extra media query chara e. */
.spo-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
}
.spo-p-card {
	background: var(--spo-bg);
	border: 1px solid var(--spo-border);
	border-radius: var(--spo-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .15s ease, transform .15s ease;
}
.spo-p-card:hover {
	box-shadow: 0 10px 24px rgba(0,0,0,.07);
	transform: translateY(-2px);
}
.spo-p-thumb-link { display: block; }
.spo-p-thumb {
	position: relative;
	aspect-ratio: 1 / 1;
	background: #f3f4f6;
}
.spo-p-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spo-p-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: .02em;
}
.spo-p-badge-sale { background: var(--spo-primary); }
.spo-p-badge-out { background: #ef4444; }

.spo-p-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.spo-p-body h3 {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 700;
	color: var(--spo-text);
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.spo-p-price { margin-bottom: 12px; font-size: 15px; font-weight: 800; color: var(--spo-primary-dark); }
.spo-p-price-old {
	font-size: 12.5px;
	font-weight: 500;
	color: var(--spo-muted);
	text-decoration: line-through;
	margin-right: 6px;
}
/* margin-top: auto — jotoi title/description choto-boro hok na keno,
   Edit/Delete button shob card e ekdom niche, ek line e thake */
.spo-p-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.spo-p-actions form { margin: 0; }
.spo-p-actions .spo-btn-admin { flex: 1; justify-content: center; }
.spo-p-actions .spo-btn-admin-danger { flex: 0 0 auto; }

/* ---------- Product grid: small screens ---------- */
/* 480px er niche 220px+ column dile ekta card e ashe, dekhte fanka lage —
   tai ekhane 2-column e neme ashe, chobi o ektu compact hoy. */
@media (max-width: 480px) {
	.spo-product-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.spo-p-body { padding: 10px 10px 12px; }
	.spo-p-body h3 { font-size: 13px; margin-bottom: 6px; }
	.spo-p-price { font-size: 13px; margin-bottom: 10px; }
	.spo-p-actions { gap: 6px; }
	.spo-p-actions .spo-btn-admin { padding: 6px 8px; font-size: 12px; }
	.spo-p-actions .spo-btn-admin span.dashicons { margin: 0; }
}

/* ---------- Add/Edit form ---------- */
.spo-product-form {
	background: var(--spo-bg);
	border: 1px solid var(--spo-border);
	border-radius: var(--spo-radius);
	padding: 26px;
	max-width: 900px;
}
.spo-form-grid {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 32px;
}
@media (max-width: 782px) {
	.spo-form-grid { grid-template-columns: 1fr; }
}

.spo-form-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 8px;
	color: var(--spo-text);
}

/* Dropzone */
.spo-dropzone {
	position: relative;
	border: 2px dashed var(--spo-border);
	border-radius: var(--spo-radius);
	background: #f9fafb;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
	overflow: hidden;
}
.spo-dropzone:hover,
.spo-dropzone:focus,
.spo-dropzone.spo-dropzone-drag {
	border-color: var(--spo-primary);
	background: #f0fdf4;
	outline: none;
}
.spo-dropzone-empty {
	text-align: center;
	color: var(--spo-muted);
	padding: 20px;
}
.spo-dropzone-empty .dashicons {
	font-size: 34px;
	width: 34px;
	height: 34px;
	color: #9ca3af;
	margin-bottom: 6px;
}
.spo-dropzone-empty p { margin: 0; font-size: 13.5px; }
.spo-dropzone-empty p strong { color: var(--spo-text); }
.spo-dropzone-empty .spo-hint { font-size: 12px; margin-top: 4px; color: #9ca3af; }

.spo-dropzone-preview {
	position: relative;
	width: 100%;
	height: 100%;
}
.spo-dropzone-preview img,
.spo-dropzone-preview video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/* Banner image/video previews are wide (not square like the product photo). */
.spo-dropzone--wide {
	aspect-ratio: 16 / 6;
}
@media (max-width: 480px) {
	.spo-dropzone--wide { aspect-ratio: 16 / 9; }
}

/* Banner Image gallery — multiple image upload, auto-slide on frontend. */
.spo-banner-gallery-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 520px;
}
.spo-banner-gallery-item {
	position: relative;
	width: 110px;
	height: 78px;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--spo-border);
	background: #f9fafb;
}
.spo-banner-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.spo-banner-gallery-item .spo-remove-img {
	top: 3px;
	right: 3px;
	width: 20px;
	height: 20px;
	font-size: 13px;
}
.spo-banner-gallery-add {
	width: 110px;
	height: 78px;
	border-radius: 10px;
	border: 2px dashed var(--spo-border);
	background: #f9fafb;
	color: var(--spo-muted);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	font-size: 11.5px;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}
.spo-banner-gallery-add:hover,
.spo-banner-gallery-add:focus {
	border-color: var(--spo-primary);
	background: #f0fdf4;
	outline: none;
}
.spo-banner-gallery-add .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}
.spo-banner-gallery--empty .spo-banner-gallery-add {
	width: 100%;
	height: 78px;
}
.spo-radio-inline {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	cursor: pointer;
}
.spo-radio-inline input[type="radio"] { margin: 0; }
.spo-remove-img {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: none;
	background: rgba(17,24,39,.65);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.spo-remove-img:hover { background: rgba(220,38,38,.9); }

/* Fields */
.spo-form-field { margin-bottom: 16px; }
.spo-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 480px) {
	.spo-form-row { grid-template-columns: 1fr; }
}

.spo-form-field input[type="text"],
.spo-form-field input[type="number"],
.spo-form-field textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--spo-border);
	border-radius: 9px;
	padding: 10px 12px;
	font-size: 14px;
	font-family: inherit;
}
.spo-form-field input:focus,
.spo-form-field textarea:focus {
	outline: none;
	border-color: var(--spo-primary);
	box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.spo-form-field textarea { resize: vertical; }
.spo-form-hint {
	margin: 6px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--spo-muted, #6b7280);
}

.spo-toggle-group {
	display: inline-flex;
	background: #f3f4f6;
	border-radius: 10px;
	padding: 4px;
	gap: 4px;
}
.spo-toggle-option {
	position: relative;
	cursor: pointer;
}
.spo-toggle-option input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.spo-toggle-option span {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--spo-muted);
	transition: background .15s ease, color .15s ease;
}
.spo-toggle-option input:checked + span {
	background: #fff;
	color: var(--spo-text);
	box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.spo-toggle-option input:checked + span::before {
	content: "●";
	color: var(--spo-primary);
	margin-right: 6px;
	font-size: 9px;
}

.spo-form-actions { margin-top: 22px; }

/* ---------- Sold badge (product grid) ---------- */
.spo-p-sold { font-size: 12px; color: var(--spo-muted); margin-bottom: 10px; }
.spo-p-body h3 a { color: inherit; text-decoration: none; }
.spo-p-body h3 a:hover { color: var(--spo-primary-dark); }

/* ---------- Product stats (edit page) ---------- */
.spo-p-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px;
	margin-bottom: 22px;
}
.spo-p-stat {
	background: var(--spo-bg);
	border: 1px solid var(--spo-border);
	border-radius: 12px;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.spo-p-stat-num { font-size: 22px; font-weight: 800; color: var(--spo-primary-dark); }
.spo-p-stat-label { font-size: 12px; color: var(--spo-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }

/* ---------- On/Off switch (Reviews toggle) ---------- */
.spo-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
}
.spo-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.spo-switch-slider {
	position: relative;
	width: 42px;
	height: 24px;
	background: #d1d5db;
	border-radius: 999px;
	transition: background .15s ease;
	flex-shrink: 0;
}
.spo-switch-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	transition: transform .15s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.spo-switch input:checked + .spo-switch-slider { background: var(--spo-primary); }
.spo-switch input:checked + .spo-switch-slider::before { transform: translateX(18px); }
.spo-switch-label { font-size: 13.5px; color: var(--spo-text); }
