/*
 * The shop (shop.php, issue #131): the redesign's banner and the product grid in its style.
 * The redesigned pages get their banner styles from Elementor, which doesn't load on the shop,
 * so the banner's rules (from css/elementor-global.css, .services-hero) are repeated here.
 */

body.cp-chrome.woocommerce-page {
	--cp-shop-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--cp-shop-navy: #212459;
	--cp-shop-orange: #f27730;
}

/* ==================== Banner ==================== */
.cp-shop-hero {
	position: relative;
	height: 460px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
	background-color: var(--cp-shop-navy);
	font-family: var(--cp-shop-font);
}

.cp-shop-hero .services-hero-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	z-index: 1;
}

.cp-shop-hero .services-hero-bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(14, 17, 44, 1) 0%, rgba(22, 24, 61, 0.8) 55%, rgba(14, 17, 44, 0.5) 100%);
	opacity: var(--hero-overlay-opacity, 0.65);
}

.cp-shop-hero .services-hero-content {
	position: relative;
	z-index: 3;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 80px 20px 0;
	text-align: center;
}

.cp-shop-hero .hero-title {
	font-family: var(--cp-shop-font);
	font-size: 3.6rem;
	font-weight: 900;
	line-height: 1.08;
	color: #fff;
	letter-spacing: -1px;
	margin: 0 0 16px;
	text-transform: uppercase;
	text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

.cp-shop-hero .hero-desc {
	font-size: 1.22rem;
	line-height: 1.55;
	color: #fff;
	margin: 0 auto 30px;
	max-width: 720px;
	font-weight: 500;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.cp-shop-hero .hero-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 2px solid var(--cp-shop-orange);
	background: rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(4px);
	color: #fff;
	font-family: var(--cp-shop-font);
	font-size: 1.1rem;
	font-weight: 800;
	padding: 12px 34px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-decoration: none;
	transition: all 0.2s ease;
}

.cp-shop-hero .hero-btn-primary:hover {
	background: var(--cp-shop-orange);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(242, 119, 48, 0.4);
}

@media (max-width: 768px) {
	.cp-shop-hero {
		height: 400px;
	}
	.cp-shop-hero .hero-title {
		font-size: 2.4rem;
	}
	.cp-shop-hero .hero-desc {
		font-size: 1.05rem;
	}
}

/* ==================== Product grid ==================== */

/* Blocksy's plain grey "Shop" title band: the redesign's banner replaces it. */
body.cp-shop .hero-section,
body.cp-woo-band-page .hero-section {
	display: none;
}

body.cp-shop #main,
body.cp-woo-band-page #main {
	padding-top: 50px;
}

.cp-shop-anchor {
	position: relative;
	top: -90px;
}

/* The grid: 4 across on desktop, 3 on tablets, 2 on phones (Blocksy's own was 6 and 3, too narrow) */
body.cp-shop ul.products {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 28px !important;
}

@media (max-width: 999px) {
	body.cp-shop ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 689px) {
	body.cp-shop ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 16px !important;
	}
	body.cp-shop #main {
		padding-top: 30px;
	}
	.woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: 1rem;
		padding: 0 12px;
	}
	.woocommerce ul.products li.product .button {
		font-size: 0.8rem;
		padding: 10px 12px;
	}
}

/* Product cards */
.woocommerce ul.products li.product {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 6px 24px rgba(22, 24, 61, 0.08);
	padding: 0 0 22px;
	overflow: hidden;
	text-align: center;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.woocommerce ul.products li.product:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(22, 24, 61, 0.14);
}

.woocommerce ul.products li.product figure,
.woocommerce ul.products li.product .ct-media-container {
	margin: 0 0 16px;
	border-radius: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--cp-shop-font);
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--cp-shop-navy);
	padding: 0 18px;
}

.woocommerce ul.products li.product .price {
	color: var(--cp-shop-orange);
	font-weight: 800;
	font-size: 1.1rem;
}

.woocommerce ul.products li.product .ct-woo-card-actions {
	justify-content: center;
}

.woocommerce ul.products li.product .entry-meta {
	display: none;
}

/* Buttons on every WooCommerce page: the redesign's orange pill */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce .ct-cart-actions .button,
.wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	background-color: var(--cp-shop-orange) !important;
	border-color: var(--cp-shop-orange) !important;
	color: #fff !important;
	border-radius: 4px !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.wc-block-components-button:not(.is-link):hover {
	background-color: #d9621f !important;
	border-color: #d9621f !important;
}

/* An empty shop: a calm message instead of the default notice box */
body.cp-shop .woocommerce-info {
	text-align: center;
	background: none;
	border: 0;
	font-size: 1.1rem;
	color: var(--cp-shop-navy);
}


/* ==================== Cart, checkout, my account ==================== */

/* The short band with the page name */
.cp-shop-hero.cp-woo-band {
	height: 280px;
}

.cp-woo-band .hero-title {
	font-size: 2.8rem;
	margin: 0;
}

@media (max-width: 768px) {
	.cp-shop-hero.cp-woo-band {
		height: 220px;
	}
	.cp-woo-band .hero-title {
		font-size: 2rem;
	}
}

/* One font and the navy headings, instead of Blocksy's Playfair Display and Montserrat */
body.cp-woo-band-page main,
body.cp-woo-band-page main h1,
body.cp-woo-band-page main h2,
body.cp-woo-band-page main h3,
body.cp-woo-band-page .wc-block-components-title,
body.cp-woo-band-page .wc-block-cart__totals-title {
	font-family: var(--cp-shop-font);
}

body.cp-woo-band-page main h2,
body.cp-woo-band-page main h3,
body.cp-woo-band-page .wc-block-components-title,
body.cp-woo-band-page .wc-block-cart__totals-title {
	color: var(--cp-shop-navy);
	font-weight: 800;
	letter-spacing: -0.2px;
}

body.cp-woo-band-page .wc-block-components-checkout-step__title,
body.cp-woo-band-page .wc-block-components-title.wc-block-components-title {
	font-size: 1.3rem;
}

/* Product names: navy, not the theme's maroon link colour */
body.cp-woo-band-page .wc-block-components-product-name,
body.cp-woo-band-page main a:not(.button):not(.wc-block-components-button) {
	color: var(--cp-shop-navy);
}

body.cp-woo-band-page .wc-block-components-product-name {
	font-weight: 700;
	text-decoration: none;
}

body.cp-woo-band-page .wc-block-components-product-name:hover {
	color: var(--cp-shop-orange);
}

/* The order summary and cart totals as a white card */
body.cp-woo-band-page .wc-block-components-sidebar .wp-block-woocommerce-checkout-order-summary-block,
body.cp-woo-band-page .wc-block-cart__sidebar.wp-block-woocommerce-cart-totals-block {
	background: #fff;
	border: 1px solid #e6e7ef;
	border-radius: 14px;
	box-shadow: 0 6px 24px rgba(22, 24, 61, 0.08);
	padding: 8px 20px 12px;
}

body.cp-woo-band-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.cp-woo-band-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: var(--cp-shop-navy);
	font-weight: 800;
}

/* Fields and choices: softer borders, rounded, orange when in use */
body.cp-woo-band-page .wc-block-components-text-input input,
body.cp-woo-band-page .wc-block-components-textarea,
body.cp-woo-band-page .wc-blocks-components-select .wc-blocks-components-select__select,
body.cp-woo-band-page .wc-block-components-combobox .components-combobox-control input,
body.cp-woo-band-page .wc-block-components-radio-control--highlight-checked,
body.cp-woo-band-page .wc-block-components-radio-control-accordion-option,
body.cp-woo-band-page .wc-block-components-quantity-selector {
	border-color: #cfd2e0 !important;
	border-radius: 8px !important;
}

body.cp-woo-band-page .wc-block-components-text-input input:focus,
body.cp-woo-band-page .wc-block-components-textarea:focus,
body.cp-woo-band-page .wc-blocks-components-select .wc-blocks-components-select__select:focus,
body.cp-woo-band-page .wc-block-components-combobox .components-combobox-control input:focus {
	border-color: var(--cp-shop-orange) !important;
	box-shadow: 0 0 0 1px var(--cp-shop-orange) !important;
	outline: none;
}

body.cp-woo-band-page .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option-checked {
	box-shadow: inset 0 0 0 2px var(--cp-shop-orange) !important;
}

/* The chosen payment method: one orange outline round the whole box, not just its title row */
body.cp-woo-band-page .wc-block-components-radio-control-accordion-option {
	box-shadow: inset 0 0 0 2px var(--cp-shop-orange) !important;
	border-radius: 8px;
}

body.cp-woo-band-page .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option {
	box-shadow: none !important;
}

body.cp-woo-band-page .wc-block-components-radio-control__input:checked {
	border-color: var(--cp-shop-orange) !important;
}

body.cp-woo-band-page .wc-block-components-radio-control__input:checked::before {
	background: var(--cp-shop-orange) !important;
}

body.cp-woo-band-page .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
	background: var(--cp-shop-orange);
	border-color: var(--cp-shop-orange);
}

body.cp-woo-band-page .wc-block-components-checkbox .wc-block-components-checkbox__mark {
	fill: #fff;
}

/* The big buttons: Proceed to checkout, Place order */
body.cp-woo-band-page .wc-block-cart__submit-button,
body.cp-woo-band-page .wc-block-components-checkout-place-order-button {
	min-height: 54px;
	font-size: 1.05rem;
	font-weight: 800;
}
