/* =========================================================
   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: right;
	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;
	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;
}

/* Discount row (offer) — green tint, above the taxable amount */
.pb-row-discount td {
	background: #e4f6e9;
	border-bottom: 1px solid #cdeccd;
	color: #1a7f43;
	font-weight: 600;
}
.pb-row-discount .pb-amount {
	color: #1a7f43;
}

.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;
}
.pb-backorder-buttons .pb-share-btn {
	background: #7a1f2b;
}
.pb-backorder-buttons svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* =========================================================
   Discount offer badges
   ========================================================= */
.pb-discount-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 20;
	width: 66px;
	height: 26px;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 2px 7px;
	background: #ff4654;
	color: #fff;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 0;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0;
	text-align: center;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
	pointer-events: none;
}

/* Product-list badge: compact single-line style like "15% OFF". */
.pb-discount-badge--loop {
	width: 66px;
	height: 26px;
	padding: 2px 6px;
	gap: 3px;
}

.pb-discount-badge--loop .pb-discount-percent,
.pb-discount-badge--loop .pb-discount-offer {
	display: inline;
	margin: 0;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0;
}

/* Single-product badge keeps the larger two-line design. */
.pb-discount-percent {
	display: block;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
}

.pb-discount-offer {
	display: block;
	margin-top: 2px;
	font-size: 7px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.15px;
}

.woocommerce ul.products li.product,
ul.products li.product,
.woocommerce-page ul.products li.product {
	position: relative;
}

/* Single product: prominent offer badge between the Add to Cart/share area
 * and the product meta (Categories / Tag / Weight / Purity). */
.pb-single-offer-badge {
	display: block;
	width: 100%;
	margin-top: 16px;
	margin-right: 16px;
	margin-bottom: 16px;
	margin-left: 16px;
	line-height: 1;
	clear: both;
}

.pb-single-offer-badge .pb-discount-badge {
	position: relative;
	top: auto;
	right: auto;
	bottom: auto;
	left: auto;
	width: 90px;
	height: 30px;
	padding: 6px 12px;
	border-radius: 7px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}

.pb-single-offer-badge .pb-discount-percent {
	font-size: 16px;
	font-weight: 800;
	line-height: 1;
}

.pb-single-offer-badge .pb-discount-offer {
	margin-top: 5px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.4px;
}

/* Keep the product price at the previous readable size. This only affects the
 * Price Breakup-generated price on the single product page; shop prices retain
 * their theme sizing. */
.single-product .pb-price {
	display: inline-block;
	font-size: 28px !important;
	line-height: 1.2;
}

@media (max-width: 680px) {
	.pb-discount-badge {
		top: 5px;
		right: 5px;
		width: 60px;
		height: 24px;
		padding: 2px 5px;
	}
	.pb-discount-badge--loop {
		width: 60px;
		height: 24px;
		gap: 2px;
		padding: 2px 5px;
	}
	.pb-discount-badge--loop .pb-discount-percent,
	.pb-discount-badge--loop .pb-discount-offer {
		font-size: 10px;
	}
	.pb-discount-percent {
		font-size: 11px;
	}
	.pb-discount-offer {
		margin-top: 2px;
		font-size: 6.5px;
	}

	.pb-single-offer-badge {
		margin: 0 0 8px;
	}
	.pb-single-offer-badge .pb-discount-badge {
		width: 104px;
		height: 56px;
		padding: 5px 10px;
		border-radius: 6px;
	}
	.pb-single-offer-badge .pb-discount-percent {
		font-size: 23px;
	}
	.pb-single-offer-badge .pb-discount-offer {
		font-size: 12px;
		margin-top: 4px;
	}
}
