/*
 * Clare Brady theme - WooCommerce styles
 * (featured book layout, reader reviews, cart drawer, cart/checkout/account tweaks)
 */

/* ==========================================================================
   Featured book (Shop + single product)
   ========================================================================== */

.page-body--shop .page-body__inner--wide {
	max-width: 1400px;
}

.product-feature {
	display: flex;
	gap: 20px;
	padding: 10px;
	font-family: var(--cb-body-font);
	font-size: 16px;
	line-height: 24px;
	color: #000;
}

.product-feature__media {
	flex: 0 0 calc(26.6% - 5px);
	padding: 10px;
}

.product-feature__cover {
	display: block;
	width: 100%;
	height: auto;
}

.product-feature__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: 10px;
}

.product-feature__intro {
	padding: 10px;
}

.product-feature__title {
	margin: 0 0 20px;
	font-family: "Poppins", sans-serif;
	font-size: 20px;
	font-weight: 500;
	line-height: 30px;
	color: #324a6d;
}

.product-feature__desc p {
	display: inline;
	margin: 0;
}

.product-feature__desc p + p::before {
	content: " ";
}

.product-feature__desc {
	margin-bottom: 14.4px;
}

/* the five detail columns */
.book-details {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 20px;
	padding: 10px;
}

.book-details__item {
	padding: 10px;
	text-align: center;
}

.book-details__item h4 {
	margin: 0 0 20px;
	font-family: var(--cb-heading-font);
	font-size: 22px;
	font-weight: 600;
	line-height: 22px;
	color: #000;
}

.book-details__item p {
	margin: 0 0 14.4px;
	line-height: 16px;
}

/* price + stock + quantity + add to cart */
.product-feature__buy {
	display: flex;
	gap: 20px;
	min-height: 131px;
	padding: 10px;
}

/* the single product page's buy row was 10px shorter than the Shop page's */
.single-product .product-feature__buy {
	min-height: 121px;
}

.product-feature__price {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 10px;
}

.product-feature .price {
	margin: 0 0 14.4px;
	font-family: var(--cb-heading-font);
	font-size: 20px;
	font-weight: 600;
	line-height: 63px;
	color: #958e09;
	text-align: right;
}

.product-feature .price del {
	opacity: .6;
	margin-right: .3em;
}

.product-feature .price ins {
	text-decoration: none;
}

.product-feature__cart {
	flex: 0 0 246px;
	min-width: 0;
	display: flex;
	justify-content: flex-start;
	align-items: flex-end;
	padding: 10px;
}

.product-feature__cart .stock {
	flex: 0 1 auto;
	min-width: min-content;
	margin: 0 8px 14.4px 0;
	font-family: var(--cb-system-font);
	font-size: 14.72px;
	line-height: 22.08px;
	color: #958e09;
}

.product-feature__cart .stock.out-of-stock {
	color: #e2401c;
}

.product-feature .product-feature__cart form.cart {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	margin: 0 0 20px;
	padding-left: 8px;
}

.product-feature__cart .quantity {
	margin: 0 12px 0 0;
}

.product-feature .product-feature__cart .quantity .qty {
	width: 45px;
	height: 40px;
	padding: 0;
	border: 1px solid #a5a4b0;
	border-radius: 8px;
	background: #fff;
	color: #73727a;
	font-family: var(--cb-system-font);
	font-size: 16px;
	text-align: center;
}

.product-feature .product-feature__cart button.single_add_to_cart_button.button.alt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 15px;
	border: 1px solid #a5a4b0;
	border-radius: 8px;
	background-color: #434347;
	color: #e1e0e7;
	font-family: var(--cb-system-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 16px;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s;
}

.product-feature .product-feature__cart button.single_add_to_cart_button.button.alt:hover {
	background-color: #2b2b2e;
	color: #fff;
}

.product-feature__cart .single_add_to_cart_button .icon {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.product-feature__cart .single_add_to_cart_button.disabled,
.product-feature__cart .single_add_to_cart_button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

@media (max-width: 1024px) {
	.product-feature__media {
		flex-basis: calc(26.6% - 5px);
	}

	.product-feature__cart {
		flex-basis: 183px;
	}

	.product-feature__title {
		font-size: 14px;
		line-height: 21px;
	}

	.book-details__item h4 {
		margin-bottom: 20px;
	}
}

@media (max-width: 767px) {
	.product-feature {
		flex-direction: column;
		gap: 20px;
	}

	.product-feature__media {
		flex: 0 0 auto;
		padding: 0 10px 10px;
	}

	.book-details {
		grid-template-columns: minmax(0, 1fr);
	}

	.product-feature__buy {
		flex-direction: column;
		gap: 30px;
	}

	.product-feature__cart {
		flex-basis: auto;
		justify-content: flex-start;
		align-items: center;
	}

	.product-feature .product-feature__cart form.cart {
		margin-bottom: 14.4px;
	}
}

/* ==========================================================================
   Reader reviews (content of the Shop page)
   ========================================================================== */

.shop-extra {
	min-height: 575px;
	margin-top: 20px;
	padding: 10px;
}

.cb-reviews.wp-block-columns {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	padding: 10px;
}

.cb-reviews > .wp-block-column {
	padding: 10px;
	margin: 0 !important;
}

.cb-reviews .wp-block-column > p.cb-review__stars {
	margin: 0 0 20px !important;
	padding: 0;
	font-family: Arial, sans-serif;
	font-size: 22px !important;
	line-height: 33px !important;
	letter-spacing: 2px;
	color: #1c244b;
}

.cb-reviews .wp-block-quote {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: var(--cb-system-font);
	font-size: 16px;
	line-height: 24px;
	color: #000;
}

.cb-reviews .wp-block-quote p {
	margin: 0;
}

.cb-reviews .wp-block-quote cite {
	display: block;
	margin-top: 12px;
	font-style: normal;
	font-weight: 700;
	color: #000;
}

@media (max-width: 767px) {
	.cb-reviews.wp-block-columns {
		grid-template-columns: minmax(0, 1fr);
	}

	.shop-extra {
		min-height: 0;
	}
}

/* ==========================================================================
   Cart drawer
   ========================================================================== */

.cart-drawer {
	position: fixed;
	inset: 0;
	z-index: 10000;
	visibility: hidden;
	pointer-events: none;
}

.cart-drawer.is-open {
	visibility: visible;
	pointer-events: auto;
}

.cart-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.25);
	opacity: 0;
	transition: opacity .4s;
}

.cart-drawer.is-open .cart-drawer__overlay {
	opacity: 1;
}

.cart-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 350px;
	max-width: 100%;
	padding: 20px 30px;
	overflow-y: auto;
	background: #fff;
	transform: translateX(100%);
	transition: transform .4s;
}

.cart-drawer.is-open .cart-drawer__panel {
	transform: none;
}

.cart-drawer__close {
	display: block;
	position: relative;
	width: 25px;
	height: 25px;
	margin: 0 -10px 0 auto;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.cart-drawer__close::before,
.cart-drawer__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2.5px;
	margin-top: -1px;
	background: #69727d;
	border-radius: 1px;
	transform: rotate(45deg);
}

.cart-drawer__close::after {
	transform: rotate(-45deg);
}

/* "No products in the cart." - as configured on the original (Rosarivo 45px) */
.cart-drawer .woocommerce-mini-cart__empty-message {
	margin: 0;
	font-family: var(--cb-heading-font);
	font-size: 45px;
	font-weight: 600;
	line-height: 63px;
	color: #333;
}

/* Cart contents. The original drawer never showed items (it didn't refresh),
   so these are new, in the same fonts. */
.cart-drawer .woocommerce-mini-cart {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cart-drawer .woocommerce-mini-cart .woocommerce-mini-cart-item {
	position: relative;
	display: grid;
	grid-template-columns: 70px 1fr;
	column-gap: 20px;
	align-items: center;
	margin: 0;
	padding: 20px 30px 20px 0;
	border-bottom: 1px solid #d5d8dc;
}

.cart-drawer .woocommerce-mini-cart .woocommerce-mini-cart-item a:not(.remove) {
	display: contents;
	font-family: var(--cb-heading-font);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	color: #333;
}

.cart-drawer .woocommerce-mini-cart .woocommerce-mini-cart-item img {
	grid-row: 1 / span 2;
	float: none;
	width: 70px;
	height: auto;
	margin: 0;
}

.cart-drawer .woocommerce-mini-cart-item .quantity {
	grid-column: 2;
	font-size: 16px;
	color: #69727d;
}

.cart-drawer .woocommerce-mini-cart .woocommerce-mini-cart-item a.remove {
	position: absolute;
	top: 50%;
	right: 0;
	left: auto;
	transform: translateY(-50%);
	color: #69727d !important;
	font-size: 20px;
	line-height: 1;
}

.cart-drawer .woocommerce-mini-cart .woocommerce-mini-cart-item a.remove:hover {
	background: none;
	color: #000 !important;
}

.cart-drawer .woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	margin: 0;
	padding: 20px 0;
	font-family: "Times New Roman", serif;
	font-size: 16px;
}

.cart-drawer .woocommerce-mini-cart__buttons {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	margin: 0;
}

.cart-drawer .woocommerce-mini-cart__buttons .button {
	display: block;
	margin: 0;
	padding: 14px 24px;
	border-radius: 3px;
	background: #69727d;
	color: #fff;
	font-family: var(--cb-heading-font);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
}

.cart-drawer .woocommerce-mini-cart__buttons .button:hover {
	background: #434347;
	color: #fff;
}

/* Notices (e.g. "added to your cart") sit above the banner, as on the original */
.shop-notices .woocommerce-message,
.shop-notices .woocommerce-error,
.shop-notices .woocommerce-info {
	margin: 0 0 32px;
}

/* ==========================================================================
   Cart / checkout / account pages (WooCommerce default markup)
   ========================================================================== */

.woocommerce-cart .page-body__inner,
.woocommerce-checkout .page-body__inner,
.woocommerce-account .page-body__inner {
	max-width: 1400px;
	font-family: var(--cb-system-font);
	color: #333;
}

.woocommerce-cart .entry-content h2,
.woocommerce-checkout .entry-content h2,
.woocommerce-account .entry-content h2,
.woocommerce-cart .entry-content h3,
.woocommerce-checkout .entry-content h3 {
	font-family: var(--cb-body-font);
	font-weight: 400;
	line-height: 1.2;
}

/* --- Cart + checkout: white box on the grey panel --- */

.woocommerce-cart .page-body,
.woocommerce-checkout .page-body {
	padding: 120px 10px;
}

.woocommerce-cart .entry-content > .woocommerce,
.woocommerce-checkout .entry-content > .woocommerce {
	padding: 20px;
	background: #fff;
}

.woocommerce-cart .return-to-shop {
	margin: 0;
}

.woocommerce-cart .return-to-shop .button.wc-backward {
	display: inline-block;
	margin-top: 25px;
	padding: 0;
	background: none;
	color: #202b46;
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
}

.woocommerce-cart .return-to-shop .button.wc-backward:hover {
	background: none;
	text-decoration: underline;
}

@media (max-width: 1024px) {
	.woocommerce-cart .page-body,
	.woocommerce-checkout .page-body {
		padding: 50px 30px;
	}
}

@media (max-width: 767px) {
	.woocommerce-cart .page-body,
	.woocommerce-checkout .page-body {
		padding: 40px 20px;
	}

	/* the original darkens the Cart banner on phones */
	.woocommerce-cart .page-hero {
		background: rgba(0, 0, 0, 0.6);
	}
}

/* --- My account: login / register / dashboard --- */

.woocommerce-account .page-body {
	padding: 40px 10px;
}

@media (min-width: 768px) and (max-width: 1024px) {
	.woocommerce-account .page-body {
		padding: 50px 10px;
	}
}

.woocommerce-account .woocommerce {
	font-family: var(--cb-body-font);
	font-size: 14px;
	line-height: 21px;
	color: #69727d;
}

.woocommerce-account .entry-content .woocommerce h2 {
	margin: 0 0 45px;
	font-family: var(--cb-body-font);
	font-size: 32px;
	font-weight: 400;
	line-height: 38.4px;
	color: #000;
}

.woocommerce-account .woocommerce form.login,
.woocommerce-account .woocommerce form.register,
.woocommerce-account .woocommerce form.lost_reset_password {
	margin: 28px 0;
	padding: 16px 30px;
	border: 1px solid #d5d8dc;
	border-radius: 3px;
	background: #fff;
	color: #69727d;
}

.woocommerce-account .woocommerce form .form-row {
	margin: 0 0 6px;
	padding: 3px 0;
}

.woocommerce-account .woocommerce form label {
	font-size: 14px;
	line-height: 28px;
	color: #69727d;
	/* Wordfence's login-security CSS sets label { margin-bottom:5px; font-weight:bold } site-wide */
	margin-bottom: 0;
	font-weight: 400;
	max-width: none;
}

.woocommerce-account .woocommerce form .required {
	color: #a00;
	font-weight: 700;
}

.woocommerce-account .woocommerce form .input-text {
	padding: 16px;
	border: 0;
	border-radius: 0;
	background: #f9fafa;
	color: #69727d;
	font-family: var(--cb-body-font);
	font-size: 14px;
	line-height: normal;
}

/* Log in button first, "Remember me" beside it (as on the original) */
.woocommerce-account .woocommerce form.login .form-row:has(.woocommerce-form-login__submit) {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	align-items: flex-start;
	margin-top: 20px;
}

.woocommerce-account .woocommerce form.login .woocommerce-form-login__rememberme {
	display: inline-block;
}

.woocommerce-account .woocommerce form .woocommerce-button,
.woocommerce-account .woocommerce .button {
	margin: 0 14px 0 0;
	padding: 12px 32px;
	border: 0;
	border-radius: 3px;
	background: #5bc0de;
	color: #fff;
	font-family: var(--cb-body-font);
	font-size: 14px;
	font-weight: 700;
	line-height: 14px;
}

.woocommerce-account .woocommerce form .woocommerce-button:hover,
.woocommerce-account .woocommerce .button:hover {
	background: #31b0d5;
	color: #fff;
}

.woocommerce-account .woocommerce .lost_password a,
.woocommerce-account .woocommerce a {
	color: #5bc0de;
}

.woocommerce-account .woocommerce .lost_password {
	margin: 0;
	font-size: 12px;
	line-height: 18px;
}

/* --- Cart / checkout buttons: same dark style as "Add to cart" (instead of WooCommerce purple) --- */

.woocommerce-cart .woocommerce a.checkout-button,
.woocommerce-cart .woocommerce button.button,
.woocommerce-checkout .woocommerce button.button,
.woocommerce-checkout .woocommerce #place_order {
	border: 1px solid #a5a4b0;
	border-radius: 8px;
	background-color: #434347;
	color: #e1e0e7;
	font-weight: 500;
}

.woocommerce-cart .woocommerce a.checkout-button:hover,
.woocommerce-cart .woocommerce button.button:hover,
.woocommerce-checkout .woocommerce button.button:hover,
.woocommerce-checkout .woocommerce #place_order:hover {
	background-color: #2b2b2e;
	color: #fff;
}

.woocommerce-cart .woocommerce button.button:disabled,
.woocommerce-cart .woocommerce button.button:disabled[disabled] {
	padding: .618em 1em;
	background-color: #434347;
	color: #e1e0e7;
	opacity: .5;
}

.woocommerce-cart .woocommerce table.shop_table img {
	width: 64px;
}

.woocommerce-cart .woocommerce .product-name a {
	color: #000;
}

.woocommerce-cart .cart_totals h2,
.woocommerce-checkout .woocommerce h3 {
	font-size: 26px;
	margin-bottom: 20px;
}
