/*
Theme Name: Life Slices (Astra Child)
Theme URI: https://web.makohdev.co.zw
Description: Child theme of Astra for the Life Slices Health & Wellness site migration.
Author: Makohdev
Author URI: https://web.makohdev.co.zw
Template: astra
Version: 1.12.2
Text Domain: lifeslices-child
*/

/* Brand palette pulled from the original Joomla site (vp_merchant template) */
:root {
	--ast-global-color-0: #7786bf; /* primary brand color (links, buttons, active states) */
	--ast-global-color-1: #333333; /* headings */
	--ast-global-color-2: #bfdd93; /* accent (badges, highlights) */
	--ast-global-color-3: #333333; /* body text */
	--ast-global-color-4: #ffffff; /* light background */
	--ast-global-color-5: #fafafa;
	--ast-global-color-6: #eeeeee;
	--ast-global-color-7: #e6e6e6;
	--ast-global-color-8: #222222;

	--lifeslices-primary: #7786bf;
	--lifeslices-accent: #bfdd93;
	--lifeslices-text: #333333;
}

body,
button,
input,
select,
textarea,
p,
li,
.ast-button,
.ast-custom-button {
	font-family: "Didact Gothic", Verdana, sans-serif !important;
	font-size: 18px;
	font-weight: 400;
	line-height: 27.9px;
	color: rgb(51, 51, 51);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title,
.page-title,
.product-title,
.widget-title {
	font-family: "Didact Gothic", Verdana, sans-serif !important;
	font-weight: 500;
	color: rgb(153, 204, 0);
}

h1, h2,
.entry-title,
.page-title {
	font-size: 36px;
	line-height: 39.6px;
}

a {
	color: var(--lifeslices-primary);
}

a:hover,
a:focus {
	color: #5f6ea3;
}

.ast-button,
button.button,
input[type="submit"],
.wp-block-button__link,
.site-header .main-header-bar,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce input.button {
	background-color: var(--lifeslices-primary);
	border-color: var(--lifeslices-primary);
	color: #ffffff;
}

.ast-button:hover,
button.button:hover,
input[type="submit"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce input.button:hover {
	background-color: #5f6ea3;
	border-color: #5f6ea3;
	color: #ffffff;
}

/* Accent (used for sale/highlight badges, matching the old site's green accent) */
.onsale,
.lifeslices-accent {
	background-color: var(--lifeslices-accent) !important;
	color: #222222 !important;
}

/* ---- Top bar ---- */
.ls-topbar {
	background: whitesmoke;
	color: var(--lifeslices-text);
	font-size: 14px;
}

.ls-topbar-row {
	max-width: 1200px;
	margin: 0 auto;
	padding: 6px 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.ls-topbar-row-1 {
	font-size: 12px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ls-topbar-row-2 {
	padding-top: 8px;
	padding-bottom: 8px;
}

.ls-topbar-account {
	display: flex;
	gap: 14px;
}

.ls-topbar-contact {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
}

.ls-topbar-contact .ls-icon {
	margin-right: 2px;
}

.ls-topbar a {
	color: var(--lifeslices-text) !important;
	text-decoration: none;
}

.ls-topbar a:hover {
	color: var(--lifeslices-primary) !important;
	text-decoration: underline;
}

.ls-topbar-email-wrap {
	display: none;
}

.ls-topbar-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.ls-topbar-cta {
	background: var(--lifeslices-accent);
	color: #222222 !important;
	padding: 6px 16px;
	border-radius: 20px;
	font-weight: 600;
	white-space: nowrap;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ls-topbar-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
	text-decoration: none !important;
}

.ls-cart-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	color: var(--lifeslices-primary) !important;
	line-height: 1;
}

.ls-cart-icon svg {
	display: block;
}

.ls-cart-icon .ls-cart-count {
	position: absolute;
	top: -8px;
	right: -10px;
	background: var(--lifeslices-primary);
	color: #ffffff !important;
	font-size: 11px;
	font-weight: 700;
	min-width: 17px;
	height: 17px;
	line-height: 17px;
	text-align: center;
	border-radius: 50%;
	padding: 0 3px;
}

@media (min-width: 601px) {
	.ls-topbar-email-wrap {
		display: inline;
	}
}

.ls-search-form {
	display: flex;
	align-items: center;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 20px;
	padding: 4px 6px 4px 16px;
	flex: 1;
	max-width: 380px;
}

.ls-search-form input[type="search"] {
	background: transparent;
	border: none;
	color: var(--lifeslices-text) !important;
	font-size: 13px;
	flex: 1;
	outline: none;
	min-width: 0;
}

.ls-search-form input[type="search"]::placeholder {
	color: #999999;
}

.ls-search-form button {
	background: none;
	border: none;
	color: var(--lifeslices-primary);
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
}

@media (max-width: 600px) {
	.ls-topbar-row {
		justify-content: center;
		text-align: center;
	}

	.ls-topbar-contact,
	.ls-topbar-account {
		justify-content: center;
	}

	.ls-search-form {
		order: 3;
		width: 100%;
		max-width: none;
		margin-top: 8px;
	}
}

/* Astra's own header/nav is fully replaced by our custom logo+hamburger bar
   below (.ls-main-header) and off-canvas menu (.ls-offcanvas) — hide its
   native content entirely instead of fighting its internal responsive
   JS/CSS switching, which was causing duplicate header rows to render.
   The real native blocks in this Astra version are #ast-desktop-header
   (the one with the blue/primary-colored background) and #ast-mobile-header
   — not the generic .ast-desktop-header-content/.ast-mobile-header-wrap
   classes, which don't exist in this site's markup at all. */
#masthead #ast-desktop-header,
#masthead #ast-mobile-header {
	display: none !important;
}

#masthead {
	background-color: whitesmoke !important;
	box-shadow: none;
	min-height: 0;
}

/* ---- Custom logo + hamburger bar ---- */
.ls-main-header {
	background: whitesmoke;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.ls-main-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.ls-logo-link {
	display: inline-flex;
	align-items: center;
}

.ls-logo-link img,
.ls-logo-link .custom-logo {
	display: block;
	max-height: var(--ls-logo-height, 48px);
	width: auto;
}

.ls-hamburger {
	background: none;
	border: 2px solid #222222;
	border-radius: 6px;
	width: 44px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	font-size: 18px;
	color: #000000;
}

.ls-hamburger i {
	color: #000000;
}

/* ---- Off-canvas menu ---- */
.ls-offcanvas {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 320px;
	max-width: 85vw;
	background: #ffffff;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
	z-index: 999999;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	overflow-y: auto;
}

.ls-offcanvas-open {
	transform: translateX(0);
}

.ls-offcanvas-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	background: #F3F3F3;
	color: var(--lifeslices-text);
	font-family: "Didact Gothic", Verdana, sans-serif;
	font-weight: 600;
}

.ls-offcanvas-close {
	background: none;
	border: none;
	color: var(--lifeslices-text);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.ls-offcanvas-menu-list {
	list-style: none;
	margin: 0;
	padding: 10px 0;
}

.ls-offcanvas-menu-list li {
	border-bottom: 1px solid #eeeeee;
}

.ls-offcanvas-menu-list a {
	display: block;
	padding: 14px 20px;
	color: var(--lifeslices-text);
	text-decoration: none;
	font-weight: 500;
}

.ls-offcanvas-menu-list a:hover {
	color: var(--lifeslices-primary);
}

.ls-offcanvas-menu-list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
	background: #fafafa;
}

.ls-submenu-open > .sub-menu {
	max-height: 600px;
}

.ls-offcanvas-menu-list .sub-menu a {
	padding-left: 36px;
	font-weight: 400;
	font-size: 14px;
}

.ls-offcanvas-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 999998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ls-offcanvas-backdrop-visible {
	opacity: 1;
	visibility: visible;
}

body.ls-offcanvas-no-scroll {
	overflow: hidden;
}

/* Reserve the hero slider's space immediately (before its JS initializes
   and before slides' differing image dimensions can affect layout), so the
   page doesn't visibly shift/shake on load or during slide transitions. */
#metaslider-id-228 {
	aspect-ratio: 2000 / 524;
	max-height: 524px;
	overflow: hidden;
	margin-bottom: 0;
}

#metaslider-id-228 .flexslider,
#metaslider-id-228.flexslider {
	margin-bottom: 0;
}

/* Pager dots sit over the bottom of the slide instead of below it */
#metaslider-id-228 .flex-control-nav {
	bottom: 8px;
}

#metaslider-id-228 img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Add-to-cart toast */
.ls-cart-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999998;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #ffffff;
	color: #333333;
	border-left: 4px solid var(--lifeslices-accent);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	border-radius: 6px;
	padding: 14px 18px;
	font-size: 14px;
	max-width: 320px;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.ls-cart-toast-visible {
	opacity: 1;
	transform: translateY(0);
}

.ls-cart-toast-icon {
	color: #4caf50;
	font-weight: 700;
	font-size: 16px;
}

.ls-cart-toast-msg {
	flex: 1;
}

.ls-cart-toast-link {
	color: var(--lifeslices-primary);
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
}

.ls-cart-toast-link:hover {
	text-decoration: underline;
}

@media (max-width: 480px) {
	.ls-cart-toast {
		left: 16px;
		right: 16px;
		bottom: 16px;
		max-width: none;
	}
}

/* ---- Footer ---- */
.ls-footer {
	background: #BFDD93;
	color: #333333;
	padding: 50px 20px 30px;
}

.ls-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
}

.ls-footer-col h4 {
	color: #333333 !important;
	margin-top: 0;
	margin-bottom: 14px;
	font-size: 18px;
	line-height: 1.3;
}

.ls-footer-logo {
	max-width: 160px;
	height: auto;
	margin-bottom: 14px;
}

.ls-footer-col p,
.ls-footer-col a,
.ls-footer-col li {
	color: #333333;
	font-size: 15px;
	line-height: 1.7;
}

.ls-footer-col a {
	text-decoration: none;
}

.ls-footer-col a:hover {
	color: var(--lifeslices-primary);
	text-decoration: underline;
}

.ls-footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ls-footer-whatsapp {
	display: inline-block;
	margin-top: 6px;
	background: var(--lifeslices-primary);
	color: #ffffff !important;
	padding: 8px 16px;
	border-radius: 4px;
	font-weight: 600;
}

@media (max-width: 900px) {
	.ls-footer-inner {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.ls-footer-inner {
		grid-template-columns: 1fr;
	}
}

/* Full-page loading spinner (toggle: Customizer > Loading Spinner) */
#lifeslices-preloader {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}

#lifeslices-preloader.ls-loaded {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

#lifeslices-preloader .ls-spinner {
	width: 56px;
	height: 56px;
	border: 5px solid var(--lifeslices-primary, #7786bf);
	border-top-color: var(--lifeslices-accent, #bfdd93);
	border-radius: 50%;
	animation: ls-spin 0.8s linear infinite;
}

@keyframes ls-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ============================================================
   Shop / category product grid
   ============================================================ */

.woocommerce-products-header {
	margin-bottom: 20px;
}

.woocommerce-products-header__title.page-title {
	font-family: "Didact Gothic", Verdana, sans-serif;
	font-weight: 600;
	color: var(--lifeslices-text);
	font-size: 30px;
	margin-bottom: 6px;
}

.woocommerce-breadcrumb {
	font-size: 13px;
	color: #777777;
	margin-bottom: 14px;
}

.woocommerce-breadcrumb a {
	color: #777777;
	text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
	color: var(--lifeslices-primary);
}

/* Result count + sorting bar */
.woocommerce-result-count,
.woocommerce-ordering {
	background: whitesmoke;
	border-radius: 8px;
	padding: 10px 16px;
	margin: 0 0 24px;
	font-size: 14px;
	color: #555555;
}

.woocommerce-ordering {
	display: inline-block;
}

.woocommerce-ordering select.orderby {
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 6px 10px;
	background: #ffffff;
	font-size: 13px;
	color: var(--lifeslices-text);
}

/* Product grid cards */
ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	list-style: none;
	margin: 0 !important;
	padding: 0;
}

ul.products li.product {
	width: 100% !important;
	margin: 0 !important;
	float: none !important;
	background: #ffffff;
	border: 1px solid #eeeeee;
	border-radius: 10px;
	padding: 16px 16px 20px;
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	position: relative;
}

ul.products li.product:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
	border-color: transparent;
}

ul.products li.product .astra-shop-thumbnail-wrap {
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 14px;
	background: #fafafa;
}

ul.products li.product img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}

ul.products li.product:hover img {
	transform: scale(1.04);
}

ul.products li.product .woocommerce-loop-product__title {
	font-family: "Didact Gothic", Verdana, sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--lifeslices-text);
	margin: 0 0 8px;
	line-height: 1.35;
	min-height: 2.7em;
}

ul.products li.product .price {
	display: block;
	font-size: 16px;
	font-weight: 700;
	color: var(--lifeslices-primary);
	margin-bottom: 14px;
}

ul.products li.product .price del {
	color: #aaaaaa;
	font-weight: 400;
	margin-right: 6px;
}

ul.products li.product .price ins {
	text-decoration: none;
}

ul.products li.product a.button,
ul.products li.product a.add_to_cart_button {
	display: block;
	width: 100%;
	background: var(--lifeslices-primary) !important;
	color: #ffffff !important;
	border-radius: 20px;
	padding: 10px 14px !important;
	font-size: 13px;
	font-weight: 600;
	border: none;
	transition: background 0.2s ease;
}

ul.products li.product a.button:hover,
ul.products li.product a.add_to_cart_button:hover {
	background: #5f6ea3 !important;
}

/* The small floating "quick add" icon button Astra overlays on the image */
ul.products li.product .ast-on-card-button {
	background: var(--lifeslices-primary) !important;
	border-color: var(--lifeslices-primary) !important;
}

ul.products li.product .ast-on-card-button .ast-icon svg {
	fill: #ffffff;
}

/* Sale badge, reusing the brand accent already defined for .onsale */
ul.products li.product .onsale {
	position: absolute;
	top: 10px;
	left: 10px;
	border-radius: 4px;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	z-index: 2;
}

/* Pagination */
nav.woocommerce-pagination ul {
	border: none !important;
	gap: 6px;
	display: flex;
}

nav.woocommerce-pagination ul li {
	border: none !important;
}

nav.woocommerce-pagination ul li a,
nav.woocommerce-pagination ul li span {
	border-radius: 6px !important;
	border: 1px solid #eeeeee !important;
	color: var(--lifeslices-text) !important;
	min-width: 36px;
	text-align: center;
}

nav.woocommerce-pagination ul li a:hover,
nav.woocommerce-pagination ul li span.current {
	background: var(--lifeslices-primary) !important;
	color: #ffffff !important;
	border-color: var(--lifeslices-primary) !important;
}

@media (max-width: 992px) {
	ul.products {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 680px) {
	ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}

	ul.products li.product {
		padding: 10px 10px 14px;
	}
}

@media (max-width: 420px) {
	ul.products {
		grid-template-columns: 1fr;
	}
}

/* Home: image buttons under the slider */
.ls-hero-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px;
	margin: 12px 0 30px;
}
.ls-hero-buttons a {
	flex: 0 1 267px;
	display: block;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.ls-hero-buttons a:hover {
	transform: translateY(-2px);
	opacity: 0.9;
}
.ls-hero-buttons img {
	display: block;
	width: 100%;
	height: auto;
}

/* Home: main column + right sidebar (2 products, news teaser) */
.ls-home-layout {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
	gap: 30px;
	align-items: start;
}
.ls-home-sidebar > div {
	margin-bottom: 30px;
	text-align: center;
}
.ls-side-product {
	margin-bottom: 20px;
}
.ls-side-product img,
.ls-side-news img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto 8px;
}
.ls-side-product-name {
	font-weight: 600;
}
.ls-side-news-title {
	text-align: left;
	font-size: 1.4em;
	font-weight: 700;
	margin: 10px 0;
}
.ls-side-news-title a {
	color: #99cc00;
}
.ls-side-readmore {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 0.9em;
}
@media (max-width: 768px) {
	.ls-home-layout {
		grid-template-columns: 1fr;
	}
	.ls-hero-buttons {
		justify-content: center;
	}
}

/* News / category listings: featured image on top of each card */
.archive .ast-blog-featured-section img,
.blog .ast-blog-featured-section img {
	width: 100%;
	height: auto;
	display: block;
}
.ast-article-post .post-thumb-img-content img {
	aspect-ratio: auto;
	height: auto;
	object-fit: contain;
}
.ast-article-post:hover .post-thumb-img-content img {
	transform: none;
}

/* ---- Header: logo + search + cart on one row, main nav bar below ---- */
.ls-header-tools {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 24px;
	min-width: 0;
}
.ls-header-tools .ls-search-form {
	margin-right: auto;
	margin-left: 30px;
}
.ls-main-nav {
	display: none;
	background: #F3F3F3;
	border-top: 1px solid #e0e0e0;
}
.ls-main-nav-list {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}
.ls-main-nav-list li {
	position: relative;
	margin: 0;
}
.ls-main-nav-list > li > a {
	display: block;
	padding: 12px 14px;
	color: var(--lifeslices-text);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.ls-main-nav-list > li > a:hover,
.ls-main-nav-list > li.current-menu-item > a,
.ls-main-nav-list > li.current-menu-ancestor > a {
	background: rgba(0, 0, 0, 0.06);
	color: var(--lifeslices-primary);
}
.ls-main-nav-list > li.menu-item-has-children > a::after {
	content: "\f107";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	margin-left: 6px;
}
.ls-main-nav-list .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	list-style: none;
	margin: 0;
	padding: 0;
	background: #ffffff;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
	z-index: 100;
}
.ls-main-nav-list li:hover > .sub-menu,
.ls-main-nav-list li:focus-within > .sub-menu {
	display: block;
}
.ls-main-nav-list .sub-menu a {
	display: block;
	padding: 10px 16px;
	color: var(--lifeslices-text);
	font-size: 14px;
	text-decoration: none;
}
.ls-main-nav-list .sub-menu a:hover {
	background: whitesmoke;
	color: var(--lifeslices-primary);
}
@media (min-width: 922px) {
	.ls-main-nav {
		display: block;
	}
	.ls-hamburger {
		display: none;
	}
}
@media (max-width: 921px) {
	.ls-header-tools {
		gap: 14px;
	}
	.ls-header-tools .ls-search-form {
		margin-left: 10px;
	}
}
@media (max-width: 600px) {
	.ls-main-header-inner {
		flex-wrap: wrap;
	}
	.ls-header-tools {
		order: 3;
		flex-basis: 100%;
	}
	.ls-header-tools .ls-search-form {
		margin: 0;
		margin-top: 0;
	}
	.ls-topbar-cta {
		display: none;
	}
}
