/*
Theme Name: Flatsome Child
Description: Keefa child theme — Light Market brand (see docs/getkeefa.com-design.md)
Author: Keefa
Template: flatsome
Version: 3.3.5
*/

/* -------------------------------------------------------------------------
   Keefa Light Market — design tokens
   Source: docs/getkeefa.com-design.md
   Theme mods for colors/fonts: brand/apply-theme-mods.php
   ------------------------------------------------------------------------- */

:root {
	--keefa-primary: #B87348;
	--keefa-secondary: #5C5854;
	--keefa-tertiary: #D8A06F;
	--keefa-background: #F4F1EA;
	--keefa-surface: #FFFFFF;
	--keefa-text: #161618;
	--keefa-text-subtle: #5C5854;
	--keefa-text-inverse: #F4F1EA;
	--keefa-error: #D95C5C;
	--keefa-border: #D4CEC4;
	--keefa-border-subtle: #E8E4DC;
	--keefa-compare-price: #6B6560;
	--keefa-reviews: #2F6F6F;
	--keefa-radius-sm: 4px;
	--keefa-radius-md: 8px;
	--keefa-radius-lg: 12px;
}

/* Soft parchment page base (complements Flatsome body_bg) */
body {
	background-color: var(--keefa-background);
	color: var(--keefa-text);
}

/* Primary CTAs — copper, 12px radius, ~50px height */
.button.primary,
.button.alt,
.checkout-button,
.single_add_to_cart_button,
button.button.alt,
input.button.alt,
a.button.primary,
.woocommerce-Button {
	background-color: var(--keefa-primary) !important;
	border-color: var(--keefa-primary) !important;
	color: var(--keefa-text-inverse) !important;
	border-radius: var(--keefa-radius-lg);
	min-height: 50px;
	padding: 12px 16px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	box-shadow: none;
}

.button.primary:hover,
.button.alt:hover,
.checkout-button:hover,
.single_add_to_cart_button:hover,
a.button.primary:hover {
	background-color: var(--keefa-tertiary) !important;
	border-color: var(--keefa-tertiary) !important;
	color: var(--keefa-text) !important;
}

/* Link-style / tertiary actions */
.button.is-link,
.button.plain {
	background: transparent !important;
	border-color: transparent !important;
	color: var(--keefa-text) !important;
	min-height: auto;
	padding: 0;
	border-radius: 0;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Cards / product boxes — white surface, quiet border, no shadow
   (Flatsome Theme Options has shadow sliders only; borders via child CSS —
   docs/vendor/flatsome/302-where-do-i-add-my-custom-css.md) */
.product-small .col-inner,
.product-small.box,
.box-product,
.box.has-hover,
.ux-box,
.blog-article {
	background-color: var(--keefa-surface);
	border: 1px solid var(--keefa-border);
	border-radius: var(--keefa-radius-md);
	box-shadow: none !important;
}

.product-small .box-image,
.product-small .box-image img,
.product-small .image-fade_in_back {
	border-radius: var(--keefa-radius-md);
}

.product-small .box-text {
	padding: 16px;
}

.header,
.header-wrapper {
	box-shadow: none !important;
	border-bottom: 1px solid var(--keefa-border-subtle);
}

/*
 * Native <select> — universal anti-clip.
 * Flatsome sets height:~2.5em with horizontal padding only. Adding vertical
 * padding (or inheriting a tall nav line-height) clips CJK / descenders in
 * header search categories, shop orderby, checkout, etc.
 */
select,
.form-flat select,
.woocommerce select,
select.orderby,
select.search_categories {
	box-sizing: border-box;
	height: 2.75em;
	min-height: 2.75em;
	max-height: none;
	padding-top: 0;
	padding-bottom: 0;
	padding-left: 0.85em;
	padding-right: 2.25em;
	line-height: 2.65em;
	font-size: 0.97em;
	vertical-align: middle;
	overflow: visible;
}

/* Header search layout only (select typography covered above). */
.header-search-form,
.header-search-form .searchform-wrapper,
.header-search-form .searchform,
.header-search-form .flex-row,
.header-search-form .flex-col {
	line-height: normal;
}

.header-search-form .search-form-categories {
	flex: 0 0 8.5rem;
	width: 8.5rem;
	max-width: 8.5rem;
}

.header-search-form .search-form-categories select.search_categories {
	width: 100%;
	max-width: none;
}

.header-search-form input.search-field {
	box-sizing: border-box;
	height: 2.75em;
	min-height: 2.75em;
	line-height: 2.65em;
	font-size: 0.97em;
	padding-top: 0;
	padding-bottom: 0;
	vertical-align: middle;
}

/* form-flat pulls the submit icon over the field (margin-left:-2.9em) — keep text clear */
.searchform-wrapper.form-flat input.search-field {
	padding-right: 2.9em;
}

/* Mobile drawer hardcodes nav-uppercase — keep sentence case for zh-Hant */
.mobile-sidebar .nav-uppercase > li > a {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 600;
}

.nav > li > a {
	letter-spacing: 0;
	text-transform: none;
}

/* Flatsome featured_box titles default to uppercase — keep sentence case for HK copy */
.icon-box-text h5,
.featured-box .icon-box-text h5 {
	text-transform: none;
	letter-spacing: 0;
	font-size: 1.05em;
	color: var(--keefa-text);
}

.home .section-title-container,
.home h1,
.home h2,
.home h3 {
	text-transform: none;
	letter-spacing: 0;
}

/* Never show orphaned page excerpt above the hero (Flatsome page_top_excerpt) */
.home .page-header-excerpt,
body.page .page-header-excerpt {
	display: none !important;
}

/* Hero under header — full-bleed photo */
.home .keefa-home-hero {
	min-height: min(78vh, 780px);
	display: flex;
	align-items: center;
}

.home .keefa-home-hero .section-bg,
.home .keefa-home-hero .bg {
	background-position: center center;
}

/* Homepage CTAs — one size across hero, Pool, categories, audience, suppliers */
.home a.button.primary,
.home a.button.is-outline,
.home a.button.white {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	height: 56px;
	padding: 0 1.5rem;
	font-size: 1.05rem;
	line-height: 1.2;
}

/* Hero pair: equal width so 註冊 / 入駐 read as one CTA group */
.home .keefa-home-hero a.button.primary,
.home .keefa-home-hero a.button.is-outline,
.home .keefa-home-hero a.button.white {
	min-width: 11rem;
	width: 11rem;
}

.home .keefa-hero-card {
	background: var(--keefa-surface);
	border: 1px solid var(--keefa-border);
	border-radius: var(--keefa-radius-md);
	padding: 28px 24px;
}

.home .keefa-hero-card--on-dark {
	background: rgba(244, 241, 234, 0.12);
	border-color: rgba(244, 241, 234, 0.28);
	color: var(--keefa-text-inverse);
	backdrop-filter: blur(8px);
}

.home .keefa-audience-card .img,
.home .keefa-audience-card .ux-image-wrapper,
.home .keefa-audience-card img {
	border-radius: var(--keefa-radius-md) var(--keefa-radius-md) 0 0;
	overflow: hidden;
}

.home .keefa-audience-card {
	overflow: hidden;
}

/* Col padding is 0 (border/image flush); inset the copy block */
.home .keefa-audience-card .text {
	padding: 28px 24px 32px;
}

.home .box-image img,
.home .featured-box .featured-img img {
	border-radius: var(--keefa-radius-md);
}

.home .keefa-trust .featured-box {
	padding: 8px 12px;
}

.home .keefa-trust .icon-box-img,
.home .keefa-trust-icon .icon-box-img {
	width: 64px !important;
	height: 64px;
	margin-left: auto;
	margin-right: auto;
}

.home .keefa-trust .icon-box-img .icon,
.home .keefa-trust .icon-box-img .icon-inner,
.home .keefa-trust-icon .icon-box-img .icon,
.home .keefa-trust-icon .icon-box-img .icon-inner {
	width: 64px !important;
	height: 64px !important;
	line-height: 64px;
}

.home .keefa-trust .icon-box-img img,
.home .keefa-trust-icon .icon-box-img img {
	display: block;
	width: 64px !important;
	height: 64px !important;
	max-width: 64px;
	object-fit: contain;
	border-radius: 0;
	box-shadow: none;
	opacity: 1 !important;
	filter: none;
}

/* Hero product suite icons */
.keefa-product-icons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 14px;
}

.keefa-product-icon {
	display: flex;
	align-items: center;
	gap: 10px;
	color: inherit;
	text-decoration: none;
	font-size: 0.92rem;
	line-height: 1.25;
	font-weight: 600;
}

.keefa-product-icon img {
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	border-radius: var(--keefa-radius-md);
	background: transparent;
}

.keefa-product-icon:hover,
.keefa-product-icon:focus {
	color: var(--keefa-tertiary);
	text-decoration: none;
}

.keefa-hero-card--on-dark .keefa-product-icon {
	color: var(--keefa-text-inverse);
}

.keefa-hero-card--on-dark .keefa-product-icon:hover {
	color: var(--keefa-tertiary);
}

/* Hero imgs are copper SVGs — force white on dark photo (trust strip stays copper) */
.keefa-product-icons--hero .keefa-product-icon img {
	filter: brightness(0) invert(1);
}

.keefa-product-icons--hero .keefa-product-icon:hover img,
.keefa-product-icons--hero .keefa-product-icon:focus img {
	opacity: 0.85;
}

/* Forms — text fields only (selects use the universal rule above).
 * Exclude qty +/- controls: .form-flat wraps ux-quantity and padding:12px
 * on those inputs blows up the compact stepper layout.
 */
.form-flat input:not([type="button"]):not([type="submit"]):not([type="reset"]):not(.qty):not(.ux-quantity__button),
.form-flat textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"]:not(.qty),
textarea,
.woocommerce form .input-text:not(.qty) {
	background-color: var(--keefa-surface);
	color: var(--keefa-text);
	border-color: var(--keefa-border);
	border-radius: var(--keefa-radius-sm);
	padding: 12px 16px;
	box-shadow: none;
}

select,
.form-flat select,
.woocommerce select {
	background-color: var(--keefa-surface);
	color: var(--keefa-text);
	border-color: var(--keefa-border);
	border-radius: var(--keefa-radius-sm);
	box-shadow: none;
}

.form-flat input:not([type="button"]):not([type="submit"]):not(.qty):not(.ux-quantity__button):focus,
input:not(.qty):not(.ux-quantity__button):focus,
select:focus,
textarea:focus {
	border-color: var(--keefa-primary);
	outline: none;
	box-shadow: none;
}

/* Keep Flatsome quantity stepper compact (do not inherit form field padding). */
.ux-quantity input.qty,
.quantity input.qty {
	padding: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	line-height: normal !important;
	border-radius: 0;
}

.ux-quantity .ux-quantity__button,
.quantity .button.minus,
.quantity .button.plus {
	padding: 0 !important;
	min-height: 0 !important;
	border-radius: 0 !important;
}

/* Chips / tags — keep label contrast on hover (Flatsome link hover = primary copper) */
.tagcloud a,
.widget .tagcloud a,
.woocommerce .widget_product_tag_cloud a,
.footer .tagcloud a {
	background-color: var(--keefa-surface) !important;
	color: var(--keefa-text) !important;
	border: 1px solid var(--keefa-border);
	border-radius: 9999px;
	padding: 8px 12px;
	text-decoration: none;
}

.tagcloud a:hover,
.tagcloud a:focus,
.tagcloud a:active,
.widget .tagcloud a:hover,
.widget .tagcloud a:focus,
.widget .tagcloud a:active,
.woocommerce .widget_product_tag_cloud a:hover,
.woocommerce .widget_product_tag_cloud a:focus,
.woocommerce .widget_product_tag_cloud a:active,
.footer .tagcloud a:hover,
.footer .tagcloud a:focus,
.footer .tagcloud a:active {
	background-color: var(--keefa-primary) !important;
	border-color: var(--keefa-primary) !important;
	color: var(--keefa-text-inverse) !important;
}

/* Prices */
.price del,
.price del .amount {
	color: var(--keefa-compare-price);
}

.star-rating span:before,
.woocommerce-product-rating .star-rating span:before {
	color: var(--keefa-reviews);
}

/* Subtle supporting copy */
.entry-meta,
.product-short-description,
.woocommerce-product-details__short-description,
.breadcrumbs {
	color: var(--keefa-text-subtle);
}

@media only screen and (max-width: 48em) {
	.button.primary,
	.button.alt,
	.checkout-button,
	.single_add_to_cart_button {
		width: 100%;
	}
}

/* -------------------------------------------------------------------------
   WPML footer language switcher — match absolute-footer (parchment bar)
   WPML injects white/#444 chip colors by default; override to Light Market.
   ------------------------------------------------------------------------- */
.wpml-ls-statics-footer.wpml-ls {
	background-color: #E8E4DC !important;
	border: 0 !important;
	border-top: 1px solid var(--keefa-border) !important;
	margin: 0 !important;
	padding: 0.75rem 1rem !important;
	clear: both;
}

.wpml-ls-statics-footer.wpml-ls-legacy-list-horizontal > ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.15rem 1.25rem;
	margin: 0 !important;
	padding: 0;
	text-align: center;
}

.wpml-ls-statics-footer .wpml-ls-item {
	margin: 0;
	padding: 0;
}

.wpml-ls-statics-footer a,
.wpml-ls-statics-footer a:link,
.wpml-ls-statics-footer .wpml-ls-link,
.wpml-ls-statics-footer .wpml-ls-link:link,
.wpml-ls-statics-footer li:not(.wpml-ls-current-language) .wpml-ls-link,
.wpml-ls-statics-footer li:not(.wpml-ls-current-language) .wpml-ls-link:link,
.wpml-ls-statics-footer .wpml-ls-current-language > a {
	color: var(--keefa-text-subtle) !important;
	background-color: transparent !important;
	background: transparent !important;
	padding: 0.2rem 0 !important;
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0;
	text-decoration: none;
	line-height: 1.4;
	border-radius: 0;
}

.wpml-ls-statics-footer .wpml-ls-current-language > a,
.wpml-ls-statics-footer .wpml-ls-current-language > a:link {
	color: var(--keefa-text) !important;
	font-weight: 600;
}

.wpml-ls-statics-footer a:hover,
.wpml-ls-statics-footer a:focus,
.wpml-ls-statics-footer .wpml-ls-link:hover,
.wpml-ls-statics-footer .wpml-ls-link:focus,
.wpml-ls-statics-footer .wpml-ls-current-language:hover > a,
.wpml-ls-statics-footer .wpml-ls-current-language > a:focus,
.wpml-ls-statics-footer .wpml-ls-sub-menu a:hover,
.wpml-ls-statics-footer .wpml-ls-sub-menu a:focus {
	color: var(--keefa-primary) !important;
	background-color: transparent !important;
	background: transparent !important;
}

.wpml-ls-statics-footer .wpml-ls-flag {
	display: none !important;
}

.wpml-ls-statics-footer .wpml-ls-display {
	display: none !important;
}
