/*
Theme Name:   ZOVO Child
Theme URI:    https://zaflogix.com/
Description:  Mobile-first shop look for the ZOVO WooCommerce store. Child theme of the free Kadence theme. Colours, name and logo come from brand.json / brand.css (generated from brand/brand.json).
Author:       ZAFLOGIX
Template:     kadence
Version:      1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain:  zovo-child
License:      GPL-2.0-or-later
*/

/* Colours: always rgb(var(--brand-…)) from brand.css – never hex values here. */

:root {
	--zovo-wrap: 1240px;
	--zovo-gap: 16px;
	--zovo-header-h: 0px;
}

body { font-family: var(--brand-font-body); color: rgb(var(--brand-foreground)); background: rgb(var(--brand-background)); -webkit-text-size-adjust: 100%; }
h1, h2, h3, h4 { font-family: var(--brand-font-heading); }
a { color: rgb(var(--brand-primary)); }
.zovo-wrap { max-width: var(--zovo-wrap); margin: 0 auto; padding: 0 var(--zovo-gap); }
.zovo-svg { flex: none; }

/* Buttons: big, round, brand colour */
.button, button.button, .wp-element-button, .wp-block-button__link, .woocommerce a.button, .woocommerce button.button {
	border-radius: var(--brand-radius) !important;
	min-height: 44px;
	font-weight: 600;
}
.woocommerce a.button.alt, .woocommerce button.button.alt, .single_add_to_cart_button, #place_order, .checkout-button {
	background: rgb(var(--brand-primary)) !important; color: rgb(var(--brand-primary-foreground)) !important;
}
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .single_add_to_cart_button:hover, #place_order:hover, .checkout-button:hover {
	background: rgb(var(--brand-secondary)) !important; color: rgb(var(--brand-secondary-foreground)) !important;
}

/* ---------- Header ---------- */
.zovo-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 100; background: rgb(var(--brand-background)); box-shadow: 0 1px 0 rgb(var(--brand-border)); }
.zovo-topbar { background: rgb(var(--brand-secondary)); color: rgb(var(--brand-secondary-foreground)); font-size: 12px; }
.zovo-topbar__inner { display: flex; justify-content: center; gap: 14px; padding-top: 5px; padding-bottom: 5px; white-space: nowrap; overflow: hidden; }
.zovo-topbar__inner span { display: inline-flex; align-items: center; gap: 5px; }
.zovo-header__grid {
	display: grid; align-items: center; gap: 8px 10px; padding-top: 8px; padding-bottom: 10px;
	grid-template-columns: auto 1fr auto;
	grid-template-areas: "menu logo actions" "search search search";
}
.zovo-menu-toggle { grid-area: menu; }
.zovo-logo { grid-area: logo; display: inline-flex; align-items: center; text-decoration: none; }
.zovo-logo__img { height: 34px; width: auto; display: block; }
.zovo-header__actions { grid-area: actions; display: flex; align-items: center; gap: 4px; }
.zovo-header .zovo-search { grid-area: search; }

.zovo-icon-btn {
	position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: rgb(var(--brand-foreground)); cursor: pointer;
}
.zovo-icon-btn:hover, .zovo-icon-btn:focus-visible { background: rgb(var(--brand-muted)); color: rgb(var(--brand-foreground)); }
.zovo-header-wa { color: #1f7a4d; }
.zovo-cart-count {
	position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: rgb(var(--brand-primary)); color: rgb(var(--brand-primary-foreground)); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.zovo-cart-count[data-count="0"] { background: rgb(var(--brand-muted-foreground)); }

/* Search with suggestions */
.zovo-search { position: relative; display: flex; }
.zovo-search input[type="search"] {
	flex: 1; min-width: 0; height: 44px; padding: 0 48px 0 16px; font-size: 16px; /* 16px stops iOS zoom */
	border: 2px solid rgb(var(--brand-primary)); border-radius: 999px; background: rgb(var(--brand-background)); color: rgb(var(--brand-foreground));
}
.zovo-search input[type="search"]:focus { outline: none; box-shadow: 0 0 0 3px rgb(var(--brand-primary) / .2); }
.zovo-search__btn {
	position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
	border: 0; border-radius: 50%; background: rgb(var(--brand-primary)); color: rgb(var(--brand-primary-foreground)); cursor: pointer;
}
.zovo-suggest {
	position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 120; max-height: 70vh; overflow: auto;
	background: rgb(var(--brand-background)); border: 1px solid rgb(var(--brand-border)); border-radius: var(--brand-radius); box-shadow: 0 10px 30px rgb(0 0 0 / .12);
}
.zovo-suggest a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; color: rgb(var(--brand-foreground)); text-decoration: none; }
.zovo-suggest a:hover, .zovo-suggest a[aria-selected="true"] { background: rgb(var(--brand-muted)); }
.zovo-suggest img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; background: rgb(var(--brand-muted)); }
.zovo-suggest__name { flex: 1; font-size: 14px; line-height: 1.3; }
.zovo-suggest__price { font-weight: 700; color: rgb(var(--brand-primary)); white-space: nowrap; font-size: 14px; }
.zovo-suggest__all { justify-content: center; font-weight: 600; border-top: 1px solid rgb(var(--brand-border)); }
.zovo-suggest__empty { padding: 12px; color: rgb(var(--brand-muted-foreground)); font-size: 14px; }

/* Category menu (desktop) */
.zovo-catnav { display: none; border-top: 1px solid rgb(var(--brand-border)); }
.zovo-catnav__menu, .zovo-catnav__menu ul { list-style: none; margin: 0; padding: 0; }
.zovo-catnav__menu { display: flex; flex-wrap: wrap; gap: 2px; }
.zovo-catnav__menu > li { position: relative; }
.zovo-catnav__menu a { display: block; padding: 10px 12px; color: rgb(var(--brand-foreground)); text-decoration: none; font-weight: 600; font-size: 15px; }
.zovo-catnav__menu a:hover { color: rgb(var(--brand-primary)); }
.zovo-catnav__menu .sub-menu {
	position: absolute; left: 0; top: 100%; min-width: 220px; z-index: 110; padding: 6px 0; display: none;
	background: rgb(var(--brand-background)); border: 1px solid rgb(var(--brand-border)); border-radius: var(--brand-radius); box-shadow: 0 10px 30px rgb(0 0 0 / .1);
}
.zovo-catnav__menu .sub-menu .sub-menu { left: 100%; top: -7px; }
.zovo-catnav__menu .sub-menu a { font-weight: 500; padding: 8px 14px; }
.zovo-catnav__menu li:hover > .sub-menu, .zovo-catnav__menu li:focus-within > .sub-menu { display: block; }
.zovo-catnav__menu .menu-item-has-children > a::after { content: " ▾"; font-size: 11px; }
.zovo-catnav__menu .sub-menu .menu-item-has-children > a::after { content: " ▸"; }

/* Drawers (mobile menu + filters) */
.zovo-drawer { position: fixed; inset: 0; z-index: 1000; }
.zovo-drawer[hidden] { display: none; }
.zovo-drawer__backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / .45); }
.zovo-drawer__panel {
	position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 360px); overflow-y: auto; padding: 12px 16px 32px;
	background: rgb(var(--brand-background)); box-shadow: 4px 0 24px rgb(0 0 0 / .2);
}
.zovo-drawer--right .zovo-drawer__panel { left: auto; right: 0; }
.zovo-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.zovo-drawer__title { margin: 16px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--brand-muted-foreground)); }
.zovo-drawer__menu, .zovo-drawer__menu ul { list-style: none; margin: 0; padding: 0; }
.zovo-drawer__menu li { position: relative; border-bottom: 1px solid rgb(var(--brand-border)); }
.zovo-drawer__menu .sub-menu li:last-child { border-bottom: 0; }
.zovo-drawer__menu a { display: block; padding: 13px 44px 13px 0; color: rgb(var(--brand-foreground)); text-decoration: none; font-size: 16px; }
.zovo-drawer__menu .sub-menu { display: none; padding-left: 14px; border-top: 1px solid rgb(var(--brand-border)); }
.zovo-drawer__menu .sub-menu a { font-size: 15px; padding-top: 11px; padding-bottom: 11px; }
.zovo-drawer__menu li.is-open > .sub-menu { display: block; }
.zovo-submenu-toggle {
	position: absolute; right: 0; top: 4px; width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
	border: 0; background: transparent; color: rgb(var(--brand-muted-foreground)); cursor: pointer; font-size: 18px; transition: transform .15s;
}
.zovo-drawer__menu li.is-open > .zovo-submenu-toggle { transform: rotate(180deg); }
body.zovo-no-scroll { overflow: hidden; }

/* Filters */
.zovo-filter-btn { display: inline-flex !important; align-items: center; gap: 6px; background: rgb(var(--brand-background)) !important; color: rgb(var(--brand-foreground)) !important; border: 1px solid rgb(var(--brand-border)) !important; }
.zovo-filter { padding: 12px 0; border-bottom: 1px solid rgb(var(--brand-border)); }
.zovo-filter__title { margin: 0 0 8px; font-size: 15px; }
.zovo-filter ul { list-style: none; margin: 0; padding: 0; }
.zovo-filter li { padding: 4px 0; }
.zovo-filter li a { color: rgb(var(--brand-foreground)); }
.zovo-filter .children { padding-left: 14px; }
.zovo-toggle { display: inline-flex; gap: 10px; align-items: center; color: rgb(var(--brand-foreground)); text-decoration: none; }
.zovo-toggle__track { position: relative; width: 42px; height: 24px; border-radius: 12px; background: rgb(var(--brand-border)); transition: background .15s; }
.zovo-toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgb(0 0 0 / .3); }
.zovo-toggle.is-on .zovo-toggle__track { background: rgb(var(--brand-success)); }
.zovo-toggle.is-on .zovo-toggle__track::after { left: 21px; }

/* ---------- Product grids: 2 columns on phones ---------- */
.woocommerce ul.products, .wc-block-grid__products { gap: 12px !important; }
.woocommerce ul.products li.product { border: 1px solid rgb(var(--brand-border)); border-radius: var(--brand-radius); overflow: hidden; background: rgb(var(--brand-background)); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px !important; line-height: 1.35; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.woocommerce ul.products li.product .price { color: rgb(var(--brand-primary)) !important; font-weight: 700; }
.woocommerce ul.products li.product .price del { color: rgb(var(--brand-muted-foreground)); font-weight: 400; font-size: .85em; }
.woocommerce span.onsale { background: rgb(var(--brand-primary)); color: rgb(var(--brand-primary-foreground)); border-radius: 6px; min-height: 0; min-width: 0; padding: 2px 8px; line-height: 1.6; font-size: 12px; }
@media (max-width: 767px) {
	.woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.woocommerce ul.products li.product .product-details { padding: 10px !important; }
	.woocommerce ul.products li.product .button { font-size: 13px; padding: 8px 10px; }
}

/* ---------- Product page ---------- */
.single-product div.product .product_title { font-size: clamp(1.25rem, 4.5vw, 1.9rem); line-height: 1.25; }
.single-product div.product p.price { color: rgb(var(--brand-primary)); font-size: 1.6rem; font-weight: 800; }
.single-product div.product p.price del { color: rgb(var(--brand-muted-foreground)); font-size: 1rem; font-weight: 400; }
.single-product form.cart .quantity input.qty { min-height: 48px; font-size: 16px; }
.single-product form.cart .single_add_to_cart_button { min-height: 50px; font-size: 1.05rem; flex: 1; }

.zovo-sticky-atc {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: flex; gap: 10px; align-items: center;
	padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgb(var(--brand-background)); box-shadow: 0 -4px 16px rgb(0 0 0 / .12);
}
.zovo-sticky-atc[hidden] { display: none; }
.zovo-sticky-atc__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zovo-sticky-atc__name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zovo-sticky-atc__price { font-weight: 800; color: rgb(var(--brand-primary)); }
.zovo-sticky-atc__price del { display: none; }
.zovo-sticky-atc__btn { min-height: 48px; padding: 0 22px !important; }
@media (min-width: 768px) { .zovo-sticky-atc { display: none !important; } }
.zovo-highlight { animation: zovo-pulse 1.2s ease 2; }
@keyframes zovo-pulse { 50% { box-shadow: 0 0 0 4px rgb(var(--brand-primary) / .35); } }

/* ---------- Cart & checkout: one column, big fields ---------- */
.woocommerce form .form-row input.input-text, .woocommerce form .form-row select, .woocommerce form .form-row textarea, .select2-container .select2-selection--single {
	min-height: 48px; font-size: 16px; border-radius: 10px;
}
.woocommerce form .form-row label { font-weight: 600; }
.woocommerce-checkout #place_order { width: 100%; min-height: 54px; font-size: 1.1rem; }
.woocommerce-checkout .woocommerce-billing-fields h3, .woocommerce-checkout #order_review_heading { font-size: 1.2rem; }
.woocommerce-checkout .form-row .description { font-size: 13px; color: rgb(var(--brand-muted-foreground)); }
.woocommerce-cart .checkout-button { min-height: 54px; font-size: 1.1rem !important; }
.woocommerce-order-received .woocommerce-order-overview { background: rgb(var(--brand-surface)); border-radius: var(--brand-radius); padding: 16px; }

/* ---------- Home page sections ---------- */
.zovo-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px !important; }
.zovo-section-head h2 { margin: 0; font-size: clamp(1.15rem, 4vw, 1.6rem); }
.zovo-section-head a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.zovo-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.zovo-trust__item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; text-align: center; border-radius: var(--brand-radius); background: rgb(var(--brand-surface)); font-size: 13px; font-weight: 600; }
.zovo-trust__item .zovo-svg { color: rgb(var(--brand-primary)); }
.zovo-hero {
	margin-top: 12px; padding: clamp(24px, 6vw, 56px) clamp(18px, 5vw, 48px); border-radius: var(--brand-radius); overflow: hidden;
	background: linear-gradient(120deg, rgb(var(--brand-primary)), rgb(var(--brand-secondary)));
	color: rgb(var(--brand-primary-foreground));
}
.zovo-hero h1 { color: inherit; margin: 0 0 8px; font-size: clamp(1.6rem, 6vw, 2.8rem); line-height: 1.15; }
.zovo-hero p { max-width: 560px; opacity: .95; }
.zovo-hero .wp-block-button__link { background: rgb(var(--brand-accent)) !important; color: rgb(var(--brand-accent-foreground)) !important; padding: 12px 28px; }
.woocommerce ul.products li.product-category { text-align: center; }
.woocommerce ul.products li.product-category h2 { font-size: 13px !important; padding: 8px 4px !important; }
.woocommerce ul.products li.product-category mark { display: none; }

/* ---------- Footer ---------- */
.zovo-footer { margin-top: 48px; background: rgb(var(--brand-secondary)); color: rgb(var(--brand-secondary-foreground)); font-size: 14px; }
.zovo-footer a { color: rgb(var(--brand-secondary-foreground)); }
.zovo-footer__grid { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 24px; grid-template-columns: 1fr 1fr; }
.zovo-footer__brand { grid-column: 1 / -1; }
.zovo-footer h2 { font-size: 15px; margin: 0 0 10px; color: inherit; }
.zovo-footer ul { list-style: none; margin: 0; padding: 0; }
.zovo-footer li { padding: 3px 0; }
.zovo-footer__trust li { display: flex; gap: 6px; align-items: center; }
.zovo-footer__contact span { opacity: .75; }
.zovo-footer__social { display: flex; gap: 12px; margin-top: 10px !important; }
.zovo-footer__bottom { border-top: 1px solid rgb(255 255 255 / .15); padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); font-size: 12px; opacity: .85; }

/* ---------- Larger screens ---------- */
@media (min-width: 768px) {
	.zovo-menu-toggle { display: none; }
	.zovo-header__grid { grid-template-columns: auto minmax(240px, 640px) auto; grid-template-areas: "logo search actions"; justify-content: space-between; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
	.zovo-logo__img { height: 40px; }
	.zovo-catnav { display: block; }
	.zovo-topbar { font-size: 13px; }
	.zovo-topbar__inner { gap: 32px; }
	.zovo-footer__grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
	.zovo-footer__brand { grid-column: auto; }
	.zovo-trust { gap: 16px; }
	.zovo-trust__item { flex-direction: row; justify-content: center; font-size: 15px; padding: 16px; }
}
@media (max-width: 767px) {
	.zovo-topbar__inner span:nth-child(n+3) { display: none; }
	.zovo-wa-float { bottom: calc(14px + var(--zovo-bottom-offset, 0px)); }
}

.screen-reader-text:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
