/* WC Product Table v1.2.0 — Front-end Styles */

#wcpt-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ─── Filters ─── */

.wcpt-filters {
	margin-bottom: 16px;
}

.wcpt-filter-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.wcpt-search-wrap {
	flex: 1 1 300px;
}

.wcpt-category-wrap {
	flex: 0 1 280px;
}

/* Hide Out of Stock toggle */
.wcpt-oos-wrap {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-end;
	padding-bottom: 2px;
}

.wcpt-toggle-label {
	display: flex !important;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600 !important;
	color: #333;
	user-select: none;
	white-space: nowrap;
	margin: 0 !important;
}

.wcpt-toggle-label input {
	display: none;
}

.wcpt-toggle-switch {
	position: relative;
	width: 44px;
	height: 24px;
	background: #ccc;
	border-radius: 12px;
	transition: background 0.25s;
	flex-shrink: 0;
}

.wcpt-toggle-switch::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.25s;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.wcpt-toggle-label input:checked + .wcpt-toggle-switch {
	background: #2b3d7c;
}

.wcpt-toggle-label input:checked + .wcpt-toggle-switch::after {
	transform: translateX(20px);
}

.wcpt-filters label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
	color: #333;
}

.wcpt-filters input,
.wcpt-filters select {
	width: 100%;
	padding: 10px 14px;
	font-size: 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
	background: #fff;
}

.wcpt-filters input:focus,
.wcpt-filters select:focus {
	border-color: #2b3d7c;
	outline: none;
	box-shadow: 0 0 0 2px rgba(43, 61, 124, 0.15);
}

/* ─── Results info ─── */

.wcpt-results-info {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	font-size: 13px;
	color: #666;
}

/* ─── Table ─── */

.wcpt-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wcpt-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 14px;
}

.wcpt-table thead th {
	background: #2b3d7c;
	color: #fff;
	padding: 12px 16px;
	text-align: left;
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

.wcpt-table tbody tr {
	border-bottom: 1px solid #eee;
	transition: background 0.15s;
}

.wcpt-table tbody tr:hover {
	background: #f7f9fc;
}

.wcpt-table td {
	padding: 14px 16px;
	vertical-align: middle;
}

/* Columns */
.wcpt-col-thumb {
	width: 70px;
}

.wcpt-thumb-img,
.wcpt-table td.wcpt-col-thumb img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.wcpt-col-product {
	min-width: 200px;
}

.wcpt-product-name {
	font-weight: 600;
	color: #2b3d7c;
	text-decoration: none;
	font-size: 15px;
	display: block;
	margin-bottom: 4px;
}

.wcpt-product-name:hover {
	color: #1a2a5e;
	text-decoration: underline;
}

.wcpt-short-desc {
	color: #666;
	font-size: 13px;
	line-height: 1.45;
	margin: 0;
}

.wcpt-col-price {
	white-space: nowrap;
	font-weight: 600;
	font-size: 15px;
	min-width: 90px;
}

/* Stock column */
.wcpt-col-stock {
	white-space: nowrap;
	min-width: 100px;
	font-size: 13px;
}

.wcpt-stock-in {
	color: #27ae60;
	font-weight: 600;
}

.wcpt-stock-low {
	color: #e67e22;
	font-weight: 600;
}

.wcpt-stock-out {
	color: #c0392b;
	font-weight: 600;
}

.wcpt-stock-backorder {
	color: #8e44ad;
	font-weight: 600;
}

/* Quantity */
.wcpt-col-qty {
	width: 140px;
}

.wcpt-qty-wrap {
	display: inline-flex;
	align-items: center;
	border: 1px solid #ccc;
	border-radius: 4px;
	overflow: hidden;
}

.wcpt-qty-btn {
	width: 34px;
	height: 36px;
	background: #f0f0f0;
	border: none;
	font-size: 18px;
	cursor: pointer;
	color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
	padding: 0;
	line-height: 1;
}

.wcpt-qty-btn:hover {
	background: #ddd;
}

.wcpt-qty-input {
	width: 42px;
	height: 36px;
	text-align: center;
	border: none;
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
	font-size: 14px;
	-moz-appearance: textfield;
	padding: 0;
}

.wcpt-qty-input::-webkit-outer-spin-button,
.wcpt-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Action */
.wcpt-col-action {
	width: 150px;
}

.wcpt-add-to-cart {
	background: #2b3d7c;
	color: #fff;
	border: none;
	padding: 10px 18px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: background 0.2s;
	white-space: nowrap;
	text-decoration: none;
	display: inline-block;
}

.wcpt-add-to-cart:hover {
	background: #1a2a5e;
	color: #fff;
}

.wcpt-add-to-cart.adding {
	opacity: 0.6;
	pointer-events: none;
}

.wcpt-add-to-cart.added {
	background: #27ae60;
}

.wcpt-out-of-stock {
	color: #c0392b;
	font-weight: 600;
	font-size: 13px;
}

.wcpt-in-cart-full {
	color: #e67e22;
	font-weight: 600;
	font-size: 13px;
}

/* Loading */
.wcpt-loading {
	text-align: center;
	padding: 40px !important;
	color: #999;
	font-style: italic;
}

/* ─── Pagination ─── */

.wcpt-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 4px;
	padding: 20px 0;
	flex-wrap: wrap;
}

.wcpt-page-btn {
	min-width: 38px;
	height: 38px;
	border: 1px solid #ddd;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	border-radius: 4px;
	color: #333;
	transition: all 0.15s;
	padding: 0 12px;
	line-height: 38px;
}

.wcpt-page-btn:hover:not(:disabled):not(.active) {
	background: #f0f0f0;
	border-color: #bbb;
}

.wcpt-page-btn.active {
	background: #2b3d7c;
	color: #fff;
	border-color: #2b3d7c;
	font-weight: 600;
}

.wcpt-page-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.wcpt-page-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 38px;
	color: #999;
	font-size: 16px;
	user-select: none;
}

/* ─── Lightbox ─── */

.wcpt-lightbox-trigger {
	display: block;
	cursor: zoom-in;
}

.wcpt-lightbox-trigger:hover img {
	opacity: 0.8;
	transition: opacity 0.15s;
}

.wcpt-lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.85);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.wcpt-lightbox-inner {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	cursor: default;
}

.wcpt-lightbox-inner img {
	display: block;
	max-width: 90vw;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.wcpt-lightbox-close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 36px;
	height: 36px;
	background: #fff;
	border: none;
	border-radius: 50%;
	font-size: 22px;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
	color: #333;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	transition: background 0.15s;
	padding: 0;
}

.wcpt-lightbox-close:hover {
	background: #eee;
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
	.wcpt-filter-row {
		flex-direction: column;
	}

	.wcpt-category-wrap {
		flex: 1 1 auto;
	}

	.wcpt-table thead {
		display: none;
	}

	.wcpt-table tbody tr {
		display: block;
		padding: 14px;
		border: 1px solid #eee;
		margin-bottom: 10px;
		border-radius: 6px;
	}

	.wcpt-table td {
		display: block;
		padding: 4px 0;
		text-align: left;
	}

	.wcpt-table td.wcpt-col-thumb {
		margin-bottom: 8px;
	}

	.wcpt-table td.wcpt-col-thumb img {
		width: 80px;
		height: 80px;
	}

	.wcpt-table td.wcpt-col-stock {
		margin-top: 6px;
	}

	.wcpt-col-qty,
	.wcpt-col-action {
		display: inline-block;
		width: auto;
		margin-top: 8px;
		margin-right: 10px;
	}

	.wcpt-results-info {
		flex-direction: column;
		gap: 2px;
	}
}
