/*
 * CodeBazaar Marketplace - item cards and marketplace details.
 *
 * Brand colours come from the theme (Appearance > Customize), exposed by
 * Bootstrap as --bs-primary and friends, so light mode, dark mode and any
 * later rebrand flow through here without edits.
 */

:root {
	--cb-accent: #ff6b6b;
	--cb-radius: 16px;
	--cb-shadow: 0 6px 24px rgba(15, 18, 34, 0.07);
	--cb-shadow-hover: 0 16px 40px rgba(15, 18, 34, 0.14);
	--cb-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-bs-theme="dark"] {
	--cb-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
	--cb-shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* ---------- Card ---------- */

.cb-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--bs-body-bg, #fff);
	border: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
	border-radius: var(--cb-radius);
	box-shadow: var(--cb-shadow);
	transition: transform 0.3s var(--cb-ease), box-shadow 0.3s var(--cb-ease);
}

.cb-card:hover,
.cb-card:focus-within {
	transform: translateY(-4px);
	box-shadow: var(--cb-shadow-hover);
}

.cb-card-media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--bs-tertiary-bg, #f6f7fb);
}

.cb-card-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--cb-ease);
}

.cb-card:hover .cb-card-img {
	transform: scale(1.05);
}

.cb-card-badges {
	position: absolute;
	top: 12px;
	left: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cb-badge {
	padding: 4px 10px;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
	border-radius: 999px;
	/* A faint ring keeps a badge readable on a preview image of its own colour. */
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

/* Darkened brand tones: white text on the raw teal and coral is too faint to read. */
.cb-badge-free {
	background: #007f6e;
}

.cb-badge-new {
	background: #c93a3a;
}

.cb-badge-featured {
	background: var(--bs-primary, #6c4df6);
}

.cb-card-platform {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 4px 10px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	background: rgba(15, 18, 34, 0.82);
	border-radius: 999px;
}

.cb-card-platform:hover {
	color: #fff;
	background: rgba(15, 18, 34, 0.95);
}

.cb-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 16px 18px 18px;
}

.cb-card-title {
	margin: 0 0 4px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
}

.cb-card-title a {
	color: inherit;
	text-decoration: none;
}

.cb-card-title a:hover {
	color: var(--bs-primary, #6c4df6);
}

/* The whole card is clickable through the title link, with one tab stop. */
.cb-card-title a::after {
	position: absolute;
	inset: 0;
	content: "";
}

.cb-card {
	position: relative;
}

.cb-card-platform {
	z-index: 1;
}

.cb-card-author {
	margin: 0 0 14px;
	font-size: 0.8125rem;
	color: var(--bs-secondary-color, #6c757d);
}

.cb-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
}

.cb-card-price {
	font-size: 1.0625rem;
	font-weight: 700;
}

.cb-card-stats {
	display: flex;
	gap: 12px;
	font-size: 0.8125rem;
	color: var(--bs-secondary-color, #6c757d);
}

.cb-card-rating > span[aria-hidden] {
	color: #e0a100;
}

/* ---------- Focus ---------- */

.cb-card a:focus-visible,
.cb-licence .form-check-input:focus-visible {
	outline: 3px solid var(--bs-primary, #6c4df6);
	outline-offset: 2px;
}

.cb-card-title a:focus-visible {
	outline: none;
}

.cb-card:has(.cb-card-title a:focus-visible) {
	outline: 3px solid var(--bs-primary, #6c4df6);
	outline-offset: 3px;
}

/* ---------- Licence choice ---------- */

.cb-licence {
	padding: 16px 18px;
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: var(--cb-radius);
}

/* The theme lays the buy form out as a row; the licence box takes a full row above the button. */
.single-product form.cart {
	flex-wrap: wrap;
}

.single-product form.cart .cb-licence {
	flex: 0 0 100%;
	width: 100%;
}

.cb-licence legend {
	float: none;
	width: auto;
	padding: 0 6px;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.cb-card,
	.cb-card-img {
		transition: none;
	}

	.cb-card:hover,
	.cb-card:focus-within,
	.cb-card:hover .cb-card-img {
		transform: none;
	}
}

/* ---------- Full-bleed helper: break a section out of the page container ---------- */

.cb-bleed {
	width: 100vw;
	/* Themes commonly cap content children at 100% of the column. */
	max-width: none;
	margin-left: calc(50% - 50vw);
}

/* ---------- Homepage ---------- */

/*
 * The homepage uses the full container width. The theme insets a page without
 * a sidebar to ten columns and offers no setting or filter for it, so the
 * column is widened here, for the homepage only.
 */
@media (min-width: 992px) {
	.home .row > .col-lg-10.mx-auto {
		flex: 0 0 auto;
		width: 100%;
	}
}

/*
 * The hero starts exactly where the header ends. The theme pads the top of
 * the page section; removing that padding on the homepage is exact at every
 * screen size, where pulling the hero up by a fixed amount slid it under the
 * header.
 */
.home .site-main > section:first-child {
	/* The theme's spacing utility is itself !important. */
	padding-top: 0 !important;
}

.cb-hero {
	position: relative;
	overflow: hidden;
	padding: 6rem 0 5rem;
	color: #fff;
	text-align: center;
	background: linear-gradient(135deg, #0f1222 0%, #3a2aa0 55%, #6c4df6 100%);
}

.cb-hero-inner {
	position: relative;
	max-width: 820px;
}

.cb-hero-title {
	margin: 0 0 1rem;
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 700;
	line-height: 1.15;
	color: #fff;
}

.cb-hero-text {
	margin: 0 auto 2rem;
	max-width: 640px;
	font-size: 1.125rem;
	color: rgba(255, 255, 255, 0.88);
}

.cb-hero-search {
	display: flex;
	gap: 8px;
	max-width: 620px;
	margin: 0 auto 1.25rem;
	padding: 8px;
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.cb-hero-search input {
	flex: 1;
	min-width: 0;
	padding: 0.5rem 1rem;
	font-size: 1rem;
	color: #0f1222;
	background: transparent;
	border: 0;
	border-radius: 999px;
}

.cb-hero-search .btn {
	border-radius: 999px;
}

.cb-hero-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	justify-content: center;
	margin: 0;
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.75);
}

.cb-hero-links a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cb-hero-shape {
	position: absolute;
	border-radius: 50%;
	opacity: 0.35;
	filter: blur(2px);
	animation: cb-float 14s ease-in-out infinite;
}

.cb-hero-shape-1 {
	top: -60px;
	left: 8%;
	width: 220px;
	height: 220px;
	background: #00c2a8;
}

.cb-hero-shape-2 {
	right: 6%;
	bottom: -80px;
	width: 280px;
	height: 280px;
	background: #ff6b6b;
	animation-delay: -5s;
}

.cb-hero-shape-3 {
	top: 30%;
	right: 22%;
	width: 90px;
	height: 90px;
	background: #fff;
	opacity: 0.12;
	animation-delay: -9s;
}

@keyframes cb-float {
	0%,
	100% {
		transform: translate3d(0, 0, 0);
	}

	50% {
		transform: translate3d(0, -22px, 0);
	}
}

.cb-section {
	margin-top: 4rem;
}

.cb-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.cb-section-title {
	margin: 0;
	font-size: 1.5rem;
}

.cb-section-more {
	font-weight: 600;
	white-space: nowrap;
}

.cb-platforms {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
	margin: 0;
}

.cb-platform {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
	padding: 1.5rem 1rem;
	color: inherit;
	text-align: center;
	text-decoration: none;
	background: var(--bs-body-bg, #fff);
	border: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
	border-radius: var(--cb-radius);
	box-shadow: var(--cb-shadow);
	transition: transform 0.3s var(--cb-ease), box-shadow 0.3s var(--cb-ease);
}

.cb-platform:hover {
	color: inherit;
	transform: translateY(-4px);
	box-shadow: var(--cb-shadow-hover);
}

.cb-platform .bi {
	font-size: 2rem;
	color: var(--bs-primary, #6c4df6);
}

.cb-platform-name {
	font-weight: 600;
}

.cb-platform-count,
.cb-author-count {
	font-size: 0.8125rem;
	color: var(--bs-secondary-color, #6c757d);
}

.cb-numbers {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 2.5rem;
	align-items: center;
	padding: 3rem;
	color: #fff;
	background: linear-gradient(135deg, #0f1222 0%, #24195f 60%, #3a2aa0 100%);
	border-radius: var(--cb-radius);
}

.cb-numbers-title {
	margin: 0 0 0.75rem;
	font-size: 1.75rem;
	line-height: 1.2;
	color: #fff;
}

.cb-numbers-text {
	margin: 0;
	color: rgba(255, 255, 255, 0.78);
}

.cb-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
	margin: 0;
}

.cb-stat {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 1.5rem 1.25rem;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
}

.cb-stat-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-bottom: 1rem;
	font-size: 1.25rem;
	color: #fff;
	background: var(--bs-primary, #6c4df6);
	border-radius: 12px;
}

.cb-stat:nth-child(2) .cb-stat-icon {
	background: #008f7c;
}

.cb-stat:nth-child(3) .cb-stat-icon {
	background: #b07a00;
}

.cb-stat-value {
	margin: 0 0 0.25rem;
	font-family: var(--bs-headings-font-family, inherit);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
	color: #fff;
	/* A figure never breaks across lines, whatever the tile's width. */
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.cb-stat-label {
	font-size: 0.875rem;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 991.98px) {
	.cb-numbers {
		grid-template-columns: 1fr;
		padding: 2rem 1.5rem;
	}
}

.cb-authors {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
	margin: 0;
}

.cb-author {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
	padding: 1.25rem 1rem;
	color: inherit;
	text-align: center;
	text-decoration: none;
	border: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
	border-radius: var(--cb-radius);
}

.cb-author:hover {
	color: var(--bs-primary, #6c4df6);
}

.cb-author-avatar {
	border-radius: 50%;
}

.cb-author-name {
	font-weight: 600;
}

.cb-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: center;
	justify-content: space-between;
	padding: 2.5rem;
	color: #fff;
	background: linear-gradient(135deg, #6c4df6 0%, #3a2aa0 100%);
	border-radius: var(--cb-radius);
}

.cb-cta-title {
	margin: 0 0 0.25rem;
	font-size: 1.5rem;
	color: #fff;
}

.cb-cta-text {
	margin: 0;
	color: rgba(255, 255, 255, 0.9);
}

/* ---------- Catalogue filters ---------- */

.cb-filters {
	margin-bottom: 2rem;
	padding: 1.25rem;
	background: var(--bs-body-bg, #fff);
	border: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
	border-radius: var(--cb-radius);
	box-shadow: var(--cb-shadow);
}

.cb-filters-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 1rem;
	align-items: end;
}

.cb-filter-search {
	grid-column: span 2;
}

.cb-filters .form-label,
.cb-filters legend {
	float: none;
	margin-bottom: 0.25rem;
	font-size: 0.8125rem;
	font-weight: 600;
}

.cb-filter-range {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.cb-range {
	display: flex;
	gap: 6px;
	align-items: center;
}

.cb-filter-actions {
	display: flex;
	gap: 4px;
	align-items: center;
}

.cb-filters-note {
	margin: 0 0 1rem;
	font-weight: 600;
}

@media (max-width: 575.98px) {
	.cb-filter-search {
		grid-column: auto;
	}
}

/* ---------- Single item ---------- */

.cb-byline {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 0;
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	color: var(--bs-secondary-color, #6c757d);
}

.cb-byline > span + span::before {
	margin: 0 0.6rem;
	content: "\00b7";
}

/* Buy and Live preview side by side; they wrap on a narrow screen. */
.single-product form.cart {
	gap: 0.75rem;
	align-items: center;
}

.single-product form.cart .cb-preview {
	margin: 0;
}

/* The buy column stays in view while a long gallery or description scrolls. */
@media (min-width: 992px) {
	.single-product .summary.entry-summary {
		position: sticky;
		top: 6.5rem;
	}
}

.cb-features {
	columns: 2 260px;
	padding-left: 1.25rem;
}

.cb-features li {
	margin-bottom: 0.5rem;
	break-inside: avoid;
}

.cb-spec th {
	width: 34%;
	font-weight: 600;
}

.cb-author-box {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	margin: 3rem 0;
	padding: 1.5rem;
	border: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
	border-radius: var(--cb-radius);
}

/* ---------- Dashboard ---------- */

.cb-status {
	display: inline-block;
	padding: 3px 10px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	border-radius: 999px;
}

.cb-status-live {
	background: #007f6e;
}

.cb-status-pending {
	background: #8a5a00;
}

.cb-status-rejected {
	background: #c93a3a;
}

.cb-status-draft {
	background: #5c6370;
}

@media (prefers-reduced-motion: reduce) {
	.cb-hero-shape {
		animation: none;
	}

	.cb-platform {
		transition: none;
	}

	.cb-platform:hover {
		transform: none;
	}
}

/* ---------- Cart ---------- */

/* The coupon row: a proper text field beside its button. */
.woocommerce-cart td.actions {
	padding: 1rem;
}

.woocommerce-cart td.actions .coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.woocommerce-cart td.actions .coupon .input-text {
	flex: 0 1 240px;
	min-width: 0;
	height: 2.75rem;
	padding: 0 1.125rem;
	font-size: 0.9375rem;
	color: var(--bs-body-color, #212529);
	background: var(--bs-body-bg, #fff);
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: 999px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.woocommerce-cart td.actions .coupon .input-text::placeholder {
	color: var(--bs-secondary-color, #6c757d);
}

.woocommerce-cart td.actions .coupon .input-text:focus {
	border-color: var(--bs-primary, #6c4df6);
	outline: 0;
	box-shadow: 0 0 0 0.2rem rgba(108, 77, 246, 0.2);
}

.woocommerce-cart td.actions .coupon .button {
	height: 2.75rem;
}

/*
 * Every item is bought one at a time, so the cart has no quantities to change
 * and "Update cart" has nothing to do; it only ever sat there greyed out.
 * Removing a line or applying a coupon updates the cart by itself.
 */
.woocommerce-cart td.actions > button[name="update_cart"] {
	display: none;
}

/*
 * No Quantity column either: it is always one, and with nothing to change the
 * column was an empty box between Price and Subtotal.
 */
.woocommerce-cart .shop_table .product-quantity {
	display: none;
}

/* ---------- Checkout ---------- */

/*
 * Billing details on the left, the order and payment in a panel on the right.
 * WooCommerce prints them as siblings of the form, so the form is the grid.
 */
.woocommerce-checkout form.checkout {
	display: grid;
	gap: 0 2.5rem;
	align-items: start;
}

.woocommerce-checkout form.checkout > * {
	min-width: 0;
}

/* Order notes are off, so the second half of the pair has nothing in it. */
.woocommerce-checkout #customer_details.col2-set {
	grid-template-columns: minmax(0, 1fr);
}

.woocommerce-checkout #customer_details > .col-2:not(:has(.form-row)) {
	display: none;
}

.woocommerce-checkout form.checkout h3 {
	margin: 0 0 1.25rem;
	font-size: 1.375rem;
}

.woocommerce-checkout #order_review_heading {
	margin-top: 2rem;
}

@media (min-width: 992px) {
	.woocommerce-checkout form.checkout {
		grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
		grid-template-rows: auto auto 1fr;
	}

	.woocommerce-checkout form.checkout > * {
		grid-column: 1 / -1;
	}

	/* Errors (a declined card, a missing field) go on top, not under the panel. */
	.woocommerce-checkout form.checkout > .woocommerce-NoticeGroup {
		grid-row: 1;
	}

	.woocommerce-checkout form.checkout > #customer_details {
		grid-column: 1;
		grid-row: 2 / span 2;
	}

	.woocommerce-checkout form.checkout > #order_review_heading {
		grid-column: 2;
		grid-row: 2;
		margin-top: 0;
	}

	.woocommerce-checkout form.checkout > #order_review {
		grid-column: 2;
		grid-row: 3;
	}
}

/*
 * The fields as a two-column grid. They were floated, and with nothing
 * clearing the name pair the Country label was squeezed into the gap between
 * First name and Last name.
 */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.25rem;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row {
	grid-column: 1 / -1;
	float: none;
	width: auto;
	margin: 0;
}

@media (min-width: 576px) {
	.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row-first {
		grid-column: 1;
	}

	.woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row-last {
		grid-column: 2;
	}
}

.woocommerce-checkout .woocommerce-account-fields {
	margin-top: 1rem;
}

/* The order and payment panel. */
.woocommerce-checkout #order_review {
	padding: 1.5rem;
	background: var(--bs-tertiary-bg, #f6f7fb);
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: 1rem;
}

.woocommerce-checkout #order_review .shop_table {
	margin: 0 0 1.25rem;
	background: transparent;
	border: 0;
}

.woocommerce-checkout #order_review .shop_table th,
.woocommerce-checkout #order_review .shop_table td {
	padding: 0.75rem 0;
	background: transparent;
	border-width: 0 0 1px;
}

.woocommerce-checkout #order_review .shop_table td:last-child,
.woocommerce-checkout #order_review .shop_table th:last-child {
	text-align: right;
	white-space: nowrap;
}

.woocommerce-checkout #order_review .order-total th,
.woocommerce-checkout #order_review .order-total td {
	font-size: 1.125rem;
	border-bottom: 0;
}

.woocommerce-checkout #payment ul.payment_methods {
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.woocommerce-checkout #payment ul.payment_methods > li {
	padding: 0.875rem 1rem;
	background: var(--bs-body-bg, #fff);
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: 0.75rem;
}

.woocommerce-checkout #payment ul.payment_methods > li + li {
	margin-top: 0.5rem;
}

.woocommerce-checkout #payment ul.payment_methods label {
	margin: 0 0 0 0.375rem;
	font-weight: 600;
}

.woocommerce-checkout #payment .payment_box {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	color: var(--bs-secondary-color, #6c757d);
}

.woocommerce-checkout #payment .payment_box p:last-child {
	margin-bottom: 0;
}

.woocommerce-checkout #payment .woocommerce-privacy-policy-text,
.woocommerce-checkout #payment .woocommerce-terms-and-conditions-wrapper .form-row {
	font-size: 0.875rem;
}

.woocommerce-checkout #payment .woocommerce-terms-and-conditions-wrapper .form-row {
	margin-bottom: 1rem;
}

/*
 * The coupon and sign-in forms that open above the checkout: the same pill
 * field as the cart, and clear space before the billing details start.
 */
.woocommerce-checkout form.checkout_coupon,
.woocommerce-checkout form.woocommerce-form-login {
	margin: 0.5rem 0 2.5rem;
}

.woocommerce-checkout form.checkout_coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.woocommerce-checkout form.checkout_coupon .form-row {
	float: none;
	width: auto;
	margin: 0;
}

.woocommerce-checkout form.checkout_coupon .form-row-first {
	flex: 0 1 280px;
	min-width: 0;
}

.woocommerce-checkout form.checkout_coupon .form-row input.input-text {
	height: 2.75rem;
	padding: 0 1.125rem;
	border-radius: 999px;
}

.woocommerce-checkout form.checkout_coupon .button {
	height: 2.75rem;
}

.woocommerce-checkout form.checkout_coupon .clear {
	display: none;
}

/* ---------- WooCommerce forms ---------- */

/*
 * A full-width field starts on its own line. The name pair is floated and
 * nothing cleared it, so on the address and account forms the next label was
 * squeezed into the gap between First name and Last name.
 */
.woocommerce form .form-row-wide,
.woocommerce-page form .form-row-wide,
.woocommerce form fieldset,
.woocommerce-page form fieldset {
	clear: both;
}

.woocommerce-address-fields__field-wrapper::after,
.woocommerce-EditAccountForm::after {
	display: block;
	clear: both;
	content: "";
}

/*
 * My Account > Address. With billing as the only address WooCommerce leaves
 * out the wrapper the theme styles, and the lone `col-1` box took the grid's
 * one-twelfth width: the text ran down the page a word per line.
 */
.woocommerce-account .woocommerce-MyAccount-content > .woocommerce-Address {
	flex: initial;
	float: none;
	width: auto;
	max-width: 32rem;
	margin-top: 1.25rem;
	padding: 1.25rem;
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: var(--bs-border-radius, 0.5rem);
}

/* The lost-password form has one field; half a row made it look cut short. */
.woocommerce form.woocommerce-ResetPassword .form-row-first,
.woocommerce form.woocommerce-ResetPassword .form-row-last {
	float: none;
	width: 100%;
}

/* ---------- Small screens ---------- */

@media (max-width: 575.98px) {
	/* The search box ran edge to edge; keep it off the sides of the screen. */
	.cb-hero {
		padding: 4rem 0 3.5rem;
	}

	.cb-hero-inner {
		padding-inline: 1.25rem;
	}
}

/* Platform tiles: two across on a phone, with an odd last tile spanning the row. */
@media (max-width: 639.98px) {
	.cb-platforms {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cb-platforms > :last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

/* On a tablet, all five in one row rather than four and a stray. */
@media (min-width: 640px) and (max-width: 991.98px) {
	.cb-platforms {
		grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	}

	.cb-authors {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/*
 * Item tabs stay on one line on a phone and scroll sideways if they must;
 * wrapped, the last tab sat indented under the first.
 */
@media (max-width: 575.98px) {
	.woocommerce-tabs ul.wc-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.woocommerce-tabs ul.wc-tabs li {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	.woocommerce-tabs ul.wc-tabs li a {
		padding-inline: 0.625rem;
	}

	.woocommerce-tabs ul.wc-tabs li:first-child a {
		padding-left: 0;
	}
}

/*
 * Cart on a phone: with one of each item the Price column repeats Subtotal,
 * and dropping it gives the item name room instead of a word per line.
 */
@media (max-width: 575.98px) {
	.woocommerce-cart .shop_table .product-price {
		display: none;
	}

	.woocommerce-cart .shop_table th,
	.woocommerce-cart .shop_table td {
		padding-inline: 0.625rem;
	}
}

/*
 * My items on a phone: five columns did not fit and pushed the whole page
 * sideways. Sales can be read on the Earnings tab; the rest fits without it.
 */
.woocommerce-MyAccount-content {
	min-width: 0;
}

@media (max-width: 575.98px) {
	.cb-my-items th,
	.cb-my-items td {
		padding: 0.5rem 0.375rem;
		font-size: 0.875rem;
	}

	.cb-my-items th:nth-child(4),
	.cb-my-items td:nth-child(4) {
		display: none;
	}
}

@media (max-width: 575.98px) {
	/* No room for a thumbnail beside the name; it shrank to a dot. */
	.woocommerce-cart .shop_table .product-thumbnail {
		display: none;
	}

	.cb-my-items {
		margin-bottom: 0;
	}

	.cb-my-items th[scope="row"] {
		overflow-wrap: anywhere;
	}
}

/* ---------- Order received / view order ---------- */

.woocommerce-order > .woocommerce-notice,
.woocommerce-order > .woocommerce-thankyou-order-received {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	font-weight: 600;
	color: var(--bs-success-text-emphasis, #29572b);
	background: var(--bs-success-bg-subtle, #e9f8ea);
	border: 1px solid var(--bs-success-border-subtle, #bdebbf);
	border-radius: 0.75rem;
}

/* Order number, date, email, total and payment method as a row of tiles. */
.woocommerce-order ul.woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.woocommerce-order ul.woocommerce-order-overview li {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 8rem;
	margin: 0;
	padding: 0.875rem 1rem;
	font-size: 0.8125rem;
	color: var(--bs-secondary-color, #6c757d);
	overflow-wrap: anywhere;
	background: var(--bs-tertiary-bg, #f6f7fb);
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: 0.75rem;
}

.woocommerce-order ul.woocommerce-order-overview li strong {
	font-size: 0.9375rem;
	color: var(--bs-emphasis-color, #0f1222);
}

/* Clear space between Downloads, Order details and Billing address. */
.woocommerce-order-downloads,
.woocommerce-order-details,
.woocommerce-customer-details {
	margin-top: 3rem;
}

.woocommerce-MyAccount-content > p + .woocommerce-order-downloads,
.woocommerce-MyAccount-content > p + .woocommerce-order-details {
	margin-top: 2rem;
}

.woocommerce-order-downloads__title,
.woocommerce-order-details__title,
.woocommerce-customer-details .woocommerce-column__title {
	margin: 0 0 1rem;
	font-size: 1.375rem;
}

.woocommerce-customer-details address {
	padding: 1.25rem;
	font-style: normal;
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: 0.75rem;
}

/*
 * The download button. It carried the whole file name in a wide solid pill
 * that wrapped onto two lines; now a compact one-line button with an icon.
 * Every download here is unlimited and never expires, so those two columns
 * said the same thing on every row and are dropped.
 */
.woocommerce-table--order-downloads .download-remaining,
.woocommerce-table--order-downloads .download-expires {
	display: none;
}

.woocommerce-table--order-downloads .download-file {
	text-align: right;
}

.woocommerce-table--order-downloads thead .download-file {
	visibility: hidden;
}

a.woocommerce-MyAccount-downloads-file.button {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
	max-width: 100%;
	height: auto;
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	border-radius: 999px;
}

a.woocommerce-MyAccount-downloads-file.button::before {
	margin-right: 0.5rem;
	font-family: "bootstrap-icons";
	font-weight: 400;
	content: "\f30a";
}

@media (max-width: 575.98px) {
	a.woocommerce-MyAccount-downloads-file.button {
		white-space: normal;
		overflow-wrap: anywhere;
	}
}

/* On the Downloads tab the table is the first thing in the box. */
.woocommerce-MyAccount-content > .woocommerce-notices-wrapper + .woocommerce-order-downloads {
	margin-top: 0;
}

/*
 * My Account tables (Downloads, Orders, an order's details). The tab content
 * already sits in a bordered box, so a second border around the table read
 * as a box inside a box. Rows keep their dividing lines only.
 */
.woocommerce-MyAccount-content table.shop_table,
.woocommerce-MyAccount-content table.woocommerce-orders-table {
	margin-bottom: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.woocommerce-MyAccount-content table.shop_table th,
.woocommerce-MyAccount-content table.shop_table td {
	border-width: 0 0 1px;
}

.woocommerce-MyAccount-content table.shop_table th:first-child,
.woocommerce-MyAccount-content table.shop_table td:first-child {
	padding-left: 0;
}

.woocommerce-MyAccount-content table.shop_table th:last-child,
.woocommerce-MyAccount-content table.shop_table td:last-child {
	padding-right: 0;
}

.woocommerce-MyAccount-content table.shop_table > :last-child > tr:last-child > th,
.woocommerce-MyAccount-content table.shop_table > :last-child > tr:last-child > td {
	border-bottom: 0;
}

.woocommerce-MyAccount-content table.shop_table thead th {
	padding-top: 0;
}
