/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* ------------------------------------------------------------------
   SureCart store pages (added 2026-11-16, Elementor -> Bricks rebuild)
   Shop, product, checkout, dashboard and saved items stay SureCart's own
   blocks and templates, as on live. These rules fit them to the dark
   Bricks site and fix the bugs found on live.
   ------------------------------------------------------------------ */

/* Bricks makes every .alignwide 120% wide; SureCart nests alignwide blocks,
   which pushed the shop grid and the product columns past the page edge. */
.wp-block-surecart-product-list.alignwide,
.wp-block-surecart-product-list .alignwide,
.sc-template-container .alignwide {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.sc-template-wrapper > .sc-template-container.alignwide {
	width: min(1200px, 100% - 40px);
	max-width: none;
	margin-left: auto;
	margin-right: auto;
}

/* Product names and prices are set to dark grey in the blocks, so they
   vanished on the dark page (live too). */
.sc-product-item .wp-block-surecart-product-title {
	color: var(--off-white, #e7edf0) !important;
}

.sc-product-item .wp-block-surecart-product-list-price {
	color: var(--green-light, #abe5b1) !important;
}

.sc-product-item a:hover .wp-block-surecart-product-title,
.sc-product-item a:focus-visible .wp-block-surecart-product-title {
	color: var(--green-light, #abe5b1) !important;
}

/* Buy buttons in the brand colours (live: green-dark pill with mint text,
   which came from Elementor's global button style). */
.wp-block-button.wp-block-surecart-product-buy-button > .wp-block-button__link {
	border: 1px solid var(--green-dark, #135545);
	background-color: var(--green-dark, #135545);
	color: var(--mint, #d0edd6);
}

.wp-block-button.wp-block-surecart-product-buy-button > .wp-block-button__link:hover,
.wp-block-button.wp-block-surecart-product-buy-button > .wp-block-button__link:focus-visible {
	border-color: var(--surface-hover, #283b43);
	background-color: var(--surface-hover, #283b43);
	color: var(--mint, #d0edd6);
}

.wp-block-button.wp-block-surecart-product-buy-button.is-style-outline > .wp-block-button__link {
	border-color: var(--green, #78a17c);
	background-color: transparent;
	color: var(--mint, #d0edd6);
}

.wp-block-button.wp-block-surecart-product-buy-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.wp-block-surecart-product-buy-button.is-style-outline > .wp-block-button__link:focus-visible {
	background-color: var(--green-dark, #135545);
}

.wp-block-surecart-product-save-button__toggle {
	color: var(--mint, #d0edd6);
}

/* Checkout: SureCart sets the form column to the "white" preset, which
   left white fields and unreadable labels; live shows it on the page colour. */
body.page-template-template-surecart-blank {
	background-color: var(--bg, #0f1518);
}

.wp-block-surecart-checkout-form .wp-block-surecart-column.has-white-background-color {
	background-color: var(--bg, #0f1518) !important;
}

/* "You may also like" cards keep live's white panel, so their text stays dark. */
.sc-product-item .has-white-background-color .wp-block-surecart-product-title,
.sc-product-item a:hover .has-white-background-color .wp-block-surecart-product-title,
.sc-product-item .has-white-background-color a:hover .wp-block-surecart-product-title {
	color: var(--green-dark, #135545) !important;
}

.sc-product-item .has-white-background-color .wp-block-surecart-product-list-price {
	color: #404040 !important;
}

/* Shop and Saved Items are plain WordPress pages (SureCart blocks), which Bricks
   renders without side gutters below the container width. */
#brx-content.wordpress {
	box-sizing: border-box;
	width: min(1140px, 100%);
	padding-left: 20px;
	padding-right: 20px;
}

@media (min-width: 1180px) {
	#brx-content.wordpress {
		padding-left: 0;
		padding-right: 0;
	}
}

/* Checkout: SureCart's loading overlay sits 5px outside the form on each side,
   which briefly made the page scroll sideways on tablets and phones. */
.wp-block-surecart-checkout-form sc-block-ui {
	inset: 0 !important;
}
