/* =========================================================
   Price Breakup - front-end styles
   Mobile-first responsive table -> card layout
   ========================================================= */

.pb-wrapper {
	margin: 24px 0;
	font-family: inherit;
	color: #1f2d4d;
	box-sizing: border-box;
}

.pb-wrapper *,
.pb-wrapper *::before,
.pb-wrapper *::after {
	box-sizing: border-box;
}

.pb-title {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #1f2d4d;
	margin: 0 0 14px;
	text-transform: uppercase;
}

.pb-table-card {
	border: 1px solid #ececf1;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pb-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	margin: 0;
}

.pb-table thead th {
	text-align: left;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.6px;
	color: #1f2d4d;
	text-transform: uppercase;
	padding: 18px 20px;
	border-bottom: 1px solid #eee;
	white-space: nowrap;
}

.pb-table tbody td {
	padding: 14px 20px;
	color: #4a5568;
	border-bottom: 1px solid #f1f1f4;
	vertical-align: middle;
}

.pb-table tbody tr:last-child td {
	border-bottom: 0;
}

.pb-amount-col,
.pb-amount {
	text-align: right !important;
	font-weight: 600;
	color: #1f2d4d;
	white-space: nowrap;
}

.pb-strong {
	font-weight: 700;
	color: #1f2d4d;
}

/* Highlighted rows (Taxable Amount, Final Amount) */
.pb-row-highlight td {
	background: #f0d98a; /* gold tone like the reference */
	border-bottom: 1px solid #e8cf78;
}

.pb-hide-mobile {
	/* empty cells on highlight/tax rows */
}

/* =========================================================
   Tablet
   ========================================================= */
@media (max-width: 1024px) {
	.pb-table {
		font-size: 14px;
	}
	.pb-table thead th,
	.pb-table tbody td {
		padding: 12px 14px;
	}
}

/* =========================================================
   Mobile: stack each row into a card
   ========================================================= */
@media (max-width: 680px) {
	.pb-title {
		font-size: 18px;
	}

	.pb-table,
	.pb-table thead,
	.pb-table tbody,
	.pb-table tr,
	.pb-table td {
		display: block;
		width: 100%;
	}

	/* Hide the table header visually but keep it for screen readers */
	.pb-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		border: 0;
	}

	.pb-table tbody tr.pb-row {
		border-bottom: 1px solid #ececf1;
		padding: 6px 0;
	}

	.pb-table tbody tr.pb-row:last-child {
		border-bottom: 0;
	}

	.pb-table tbody td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 16px;
		text-align: right;
		padding: 9px 16px;
		border-bottom: 0;
	}

	/* Label pulled from data-label attribute */
	.pb-table tbody td::before {
		content: attr(data-label);
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.5px;
		text-transform: uppercase;
		color: #97a0b3;
		text-align: left;
		flex: 0 0 auto;
	}

	/* Don't render empty cells (those with no data-label / no content) */
	.pb-table tbody td.pb-hide-mobile {
		display: none;
	}

	.pb-table tbody td:empty {
		display: none;
	}

	/* Highlight rows become a full-width gold band */
	.pb-row-highlight {
		background: #f0d98a;
	}

	.pb-row-highlight td {
		background: #f0d98a;
	}

	.pb-amount {
		font-size: 15px;
	}
}

/* Compact rendering when used inside the shop loop */
.pb-context-loop {
	margin: 12px 0 0;
}

.pb-context-loop .pb-title {
	font-size: 14px;
	margin-bottom: 8px;
}

.pb-context-loop .pb-table {
	font-size: 12px;
}

.pb-context-loop .pb-table thead th,
.pb-context-loop .pb-table tbody td {
	padding: 8px 10px;
}

/* Final Amount output (shortcode + auto-display) */
.pb-final {
	display: inline-block;
	font-weight: 700;
	color: #1f2d4d;
}

.pb-final-label {
	font-weight: 600;
	color: #4a5568;
}

.pb-final-value {
	color: #1f2d4d;
}

.pb-final-single {
	font-size: 18px;
	margin: 6px 0 10px;
}

.pb-final-loop {
	display: block;
	font-size: 14px;
	margin: 4px 0 0;
}

/* Product weight (shop loop + single product) */
.pb-weight {
	margin: 6px 0 4px;
	font-size: 0.95em;
	color: #555;
	line-height: 1.4;
}
.pb-weight-loop {
	font-size: 0.85em;
}
.pb-weight-label {
	font-weight: 600;
}
.pb-weight-value {
	white-space: nowrap;
}

/* Stock status label (green = in stock, red = out of stock) */
.pb-stock {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 4px 0 6px;
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.4;
}
.pb-stock--in {
	color: #1aa260;
}
.pb-stock--out {
	color: #d63638;
}
.pb-stock--backorder {
	color: #e08a00;
}
.pb-stock-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	display: inline-block;
	flex: 0 0 auto;
}
.pb-stock-loop {
	font-size: 0.8em;
}

/* Backorder (preorder) WhatsApp + Share buttons on the shop loop */
.pb-backorder-buttons {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}
.pb-backorder-buttons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: #fff;
	text-decoration: none;
	transition: opacity .15s ease;
}
.pb-backorder-buttons a:hover {
	opacity: .88;
	color: #fff;
}
.pb-backorder-buttons .pb-wa-btn {
	background: #25d366;
	margin-top: 2px;
}
.pb-backorder-buttons .pb-share-btn {
	background: #7a1f2b;
	margin-top: 2px;
}
.pb-backorder-buttons svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}
