/* WC Product Order Form — front-end styles */

.wcpof-wrap {
	width: 100%;
	overflow-x: auto;
	margin: 1.5em 0;
}

.wcpof-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.4;
}

.wcpof-table thead th {
	text-align: left;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.04em;
	color: #555;
	padding: 12px 14px;
	border-bottom: 2px solid #e3e3e3;
	white-space: nowrap;
}

.wcpof-table tbody td {
	padding: 14px;
	border-bottom: 1px solid #ededed;
	vertical-align: middle;
}

.wcpof-row:hover {
	background: #fafafa;
}

.wcpof-col-image { width: 64px; }
.wcpof-thumb,
.wcpof-col-image img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.wcpof-name-link {
	font-weight: 600;
	text-decoration: none;
	color: inherit;
}
.wcpof-name-link:hover { text-decoration: underline; }

.wcpof-col-sku { color: #777; font-size: 13px; white-space: nowrap; }

.wcpof-col-price del { color: #999; margin-right: 4px; font-weight: 400; }
.wcpof-col-price ins { text-decoration: none; font-weight: 600; }

.wcpof-stock-in { color: #2e8b57; }
.wcpof-stock-out { color: #c0392b; }
.wcpof-stock { font-size: 13px; }

.wcpof-qty {
	width: 64px;
	padding: 7px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	text-align: center;
	font-size: 14px;
}

.wcpof-add-btn {
	background: #4caf7d;
	color: #fff;
	border: none;
	padding: 9px 16px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	transition: background 0.15s ease, opacity 0.15s ease;
}
.wcpof-add-btn:hover { background: #3f9d6e; }
.wcpof-add-btn.is-loading { opacity: 0.7; cursor: wait; }
.wcpof-add-btn.is-added { background: #2e8b57; }

.wcpof-add-btn-disabled,
.wcpof-add-btn:disabled {
	background: #c8c8c8;
	cursor: not-allowed;
}

.wcpof-row.wcpof-oos {
	opacity: 0.55;
}

.wcpof-empty,
.wcpof-dash {
	color: #999;
}

.wcpof-feedback {
	display: block;
	font-size: 12px;
	margin-top: 4px;
	min-height: 14px;
}
.wcpof-feedback.is-error { color: #c0392b; }
.wcpof-feedback.is-success { color: #2e8b57; }
.wcpof-feedback a { color: inherit; text-decoration: underline; }

/* ---- Subcategory filter buttons ---- */
.wcpof-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
}

.wcpof-filter-btn {
	background: #fff;
	color: #333;
	border: 1px solid #ccc;
	padding: 7px 14px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.wcpof-filter-btn:hover {
	border-color: #4caf7d;
	color: #2e8b57;
}

.wcpof-filter-btn.is-active {
	background: #4caf7d;
	color: #fff;
	border-color: #4caf7d;
}

.wcpof-no-match {
	padding: 28px 14px;
	text-align: center;
	color: #777;
	font-style: italic;
	border: 1px dashed #ddd;
	border-radius: 6px;
	margin-top: -1px;
}

/* ---- View More pagination button ---- */
.wcpof-viewmore-wrap {
	text-align: center;
	margin: 18px 0 4px;
}

.wcpof-viewmore-btn {
	background: #4caf7d;
	color: #fff;
	border: none;
	padding: 11px 22px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.wcpof-viewmore-btn:hover {
	background: #3f9d6e;
}

.wcpof-viewmore-btn.is-loading {
	opacity: 0.7;
	cursor: wait;
}

.wcpof-viewmore-btn:disabled {
	background: #c8c8c8;
	cursor: not-allowed;
}

.wcpof-viewmore-error {
	display: block;
	color: #c0392b;
	font-size: 13px;
	margin-top: 8px;
}

/* Briefly highlight newly-appended rows so the user sees what arrived. */
.wcpof-row.wcpof-just-loaded {
	animation: wcpof-fadein 0.35s ease;
}
@keyframes wcpof-fadein {
	from { background-color: #eaf7ef; }
	to   { background-color: transparent; }
}

/* ---- Responsive: stack rows into cards on narrow screens ---- */
@media screen and (max-width: 720px) {
	.wcpof-table thead { display: none; }
	.wcpof-table,
	.wcpof-table tbody,
	.wcpof-table tr,
	.wcpof-table td { display: block; width: 100%; }

	.wcpof-table tr {
		border: 1px solid #e3e3e3;
		border-radius: 6px;
		margin-bottom: 14px;
		padding: 6px 10px;
	}

	.wcpof-table td {
		border: none;
		padding: 7px 4px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
	}

	.wcpof-table td::before {
		content: attr(data-label);
		font-weight: 600;
		font-size: 12px;
		text-transform: uppercase;
		color: #777;
	}

	.wcpof-col-image { width: auto; }
}
