/*
Theme Name:        CraftMarket Child
Theme URI:         https://bzotech.com/themes/craftmarket
Author:            BZOTech
Author URI:        https://bzotech.com
Author Email:      contact@bzotech.com
Description:       Child theme of CraftMarket. Use this to make site-specific customizations that survive parent theme updates.
Template:          craftmarket
Version:           1.0.9
Requires at least: 6.4
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       craftmarket-child

CraftMarket Child WordPress Theme, Copyright BZOTech.
CraftMarket Child is distributed under the terms of the GNU GPL v2 or later.
*/

/* Newsletter signup stays hidden until a consent-aware email service is configured. */
.craftmarket-footer__news {
	display: none;
}

/* The dark footer's native grid reserves a third main column for the
 * newsletter. Since that block is intentionally hidden, rebalance the live
 * brand and widget columns so the four information groups fill the container. */
.craftmarket-footer--dark .craftmarket-footer__brand,
.craftmarket-footer--dark .craftmarket-footer__cols {
	align-self: start;
}

.craftmarket-footer--dark .craftmarket-footer__about {
	max-width: 280px;
}

.craftmarket-footer--dark .widget_custom_html p {
	margin: 0 0 18px;
	line-height: 1.65;
}

.craftmarket-footer--dark .widget_custom_html p:last-child {
	margin-bottom: 0;
}

.craftmarket-footer--dark .aa-footer-address {
	max-width: 290px;
}

.craftmarket-footer--dark .aa-footer-response {
	max-width: 270px;
	color: var(--footer-fg);
	font-size: 13px;
	opacity: 0.78;
}

@media (min-width: 1100px) {
	.craftmarket-footer--dark .craftmarket-footer__main {
		grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
		gap: clamp(48px, 5vw, 80px);
	}

	.craftmarket-footer--dark .craftmarket-footer__cols {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: clamp(32px, 4vw, 64px);
	}
}

@media (min-width: 681px) and (max-width: 1099px) {
	.craftmarket-footer--dark .craftmarket-footer__main {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.craftmarket-footer--dark .craftmarket-footer__cols {
		grid-column: 1;
		grid-row: auto;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.craftmarket-footer--dark .craftmarket-footer__col:last-child {
		grid-column: 1 / -1;
	}

	.craftmarket-footer--dark .aa-footer-address,
	.craftmarket-footer--dark .aa-footer-response {
		max-width: 440px;
	}
}

/* The homepage lead panel intentionally uses three concise benefits. The
 * parent widget fixes this grid at four columns, so the child theme supplies
 * the count-appropriate desktop layout while retaining its mobile rules. */
@media (min-width: 768px) {
	.cmh-rooms__features {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Update-safe global extension of the Home 3 latitude/longitude map. */
.craftmarket-map__land--world {
	--map: url("assets/images/maps/world.svg");
	-webkit-mask-image: url("assets/images/maps/world.svg");
	mask-image: url("assets/images/maps/world.svg");
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
}

.cmh-villages__map--world {
	--map-land: rgba(255, 255, 255, 0.28);
	max-height: none;
}

/* On desktop the world becomes an atmospheric background layer for the
 * complete story band. The native stacked map/card layout remains intact on
 * tablets and phones, where a background treatment would reduce legibility. */
@media (min-width: 1101px) {
	.elementor-element.aa-market-map-section {
		position: relative;
		overflow: hidden;
		isolation: isolate;
	}

	.aa-market-map-section > .e-con-inner,
	.aa-market-map-section .elementor-widget-craftmarket-home-h3-villages,
	.aa-market-map-section .elementor-widget-craftmarket-home-h3-villages > .elementor-widget-container,
	.aa-market-map-section .craftmarket-section--h3-villages,
	.aa-market-map-section .cmh-villages__inner--world {
		position: static;
	}

	.aa-market-map-section > .e-con-inner > .cm-box {
		position: relative;
		z-index: 3;
	}

	.aa-market-map-section .cmh-villages__inner--world.cmh-villages__inner--body {
		display: block;
		min-height: 340px;
	}

	.aa-market-map-section .cmh-villages__map--world {
		--map-land: rgba(255, 255, 255, 0.16);
		position: absolute;
		z-index: 1;
		top: 50%;
		right: 0;
		left: auto;
		width: 88%;
		max-width: 1520px;
		height: auto;
		max-height: none;
		aspect-ratio: 360 / 145;
		transform: translateY(-50%);
	}

	.aa-market-map-section .cmh-villages__cards {
		position: absolute;
		z-index: 3;
		top: 68%;
		left: 66%;
		width: clamp(560px, 42vw, 640px);
		transform: translate(-50%, -50%);
	}

	.aa-market-map-section .cmh-village {
		grid-template-columns: minmax(210px, 42%) minmax(0, 1fr);
		gap: clamp(20px, 2vw, 28px);
		min-height: 250px;
		padding: 16px;
	}

	.aa-market-map-section .cmh-village__photo {
		width: 100%;
		min-width: 0;
		height: 218px;
		min-height: 218px;
		aspect-ratio: auto;
	}

	.aa-market-map-section .cmh-village__body {
		justify-content: center;
		gap: 10px;
		padding: 8px 12px 8px 0;
	}

	.aa-market-map-section .cmh-village__title {
		font-size: clamp(22px, 1.7vw, 28px);
	}

	.aa-market-map-section .cmh-village__quote {
		padding-top: 16px;
	}

	.aa-market-map-section .cmh-village__quote p {
		font-size: clamp(14px, 1.05vw, 16px);
		line-height: 1.45;
	}
}

/* Operating locations carry the story cards. Delivery markets remain quiet,
 * lightweight map references rather than seven competing editorial cards. */
.cmh-villages__map--world .craftmarket-map__label {
	opacity: 0;
	pointer-events: none;
	transform: translateY(4px);
	transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.cmh-villages__map--world .craftmarket-map__pin--market {
	cursor: default;
}

.cmh-villages__map--world .craftmarket-map__pin--market .craftmarket-map__marker,
.cmh-villages__map--world .craftmarket-map__pin--market:hover .craftmarket-map__marker {
	opacity: 0.68;
	transform: rotate(-45deg) scale(0.72);
}

.cmh-villages__map--world .craftmarket-map__pin--story {
	z-index: 2;
}

/* Hong Kong and Shenzhen are geographically close at world-map scale. Small
 * presentation offsets keep both editable Elementor pins distinguishable. */
@media (min-width: 601px) {
	.cmh-villages__map--world .craftmarket-map__pin--hong-kong {
		transform: translate(-20px, 12px);
	}

	.cmh-villages__map--world .craftmarket-map__pin--shenzhen {
		transform: translate(20px, 16px);
	}

	.cmh-villages__map--world .craftmarket-map__pin--tianjin {
		transform: translate(4px, -6px);
	}
}

.cmh-villages__map--world .craftmarket-map__pin:hover .craftmarket-map__label,
.cmh-villages__map--world .craftmarket-map__pin:focus-visible .craftmarket-map__label,
.cmh-villages__map--world .craftmarket-map__pin[aria-selected="true"] .craftmarket-map__label {
	opacity: 1;
	transform: translateY(0);
}

@media (max-width: 600px) {
	.cmh-villages__map--world .craftmarket-map__marker {
		width: 26px;
		height: 26px;
	}

	.cmh-villages__map--world .craftmarket-map__pin {
		top: calc(var(--y) - 34px);
		left: calc(var(--x) - 13px);
		width: 26px;
		height: 34px;
	}

	.cmh-villages__map--world .craftmarket-map__label {
		top: 30px;
		left: 50%;
		transform: translate(-50%, 4px);
	}

	.cmh-villages__map--world .craftmarket-map__pin--end .craftmarket-map__label {
		right: auto;
		left: 50%;
		text-align: left;
	}

	.cmh-villages__map--world .craftmarket-map__pin:hover .craftmarket-map__label,
	.cmh-villages__map--world .craftmarket-map__pin:focus-visible .craftmarket-map__label,
	.cmh-villages__map--world .craftmarket-map__pin[aria-selected="true"] .craftmarket-map__label {
		transform: translate(-50%, 0);
	}
}

/* Calm, readable editorial layouts for customer-care and policy pages. */
.aa-editorial-page {
	max-width: 980px;
	margin-inline: auto;
}

.aa-editorial-lead {
	max-width: 820px;
	margin: 0 0 clamp(42px, 6vw, 72px);
	color: var(--text-heading, #1b1a18);
	font-family: var(--font-heading, Fraunces, Georgia, serif);
	font-size: clamp(1.35rem, 2vw, 1.85rem);
	font-weight: 400;
	line-height: 1.48;
}

.aa-editorial-section {
	margin-bottom: clamp(40px, 5vw, 64px);
	padding-bottom: clamp(38px, 5vw, 60px);
	border-bottom: 1px solid rgba(27, 26, 24, 0.12);
}

.aa-editorial-section:last-child {
	border-bottom: 0;
}

.aa-editorial-page h2 {
	max-width: 760px;
	margin: 0 0 18px;
	font-size: clamp(2rem, 3.4vw, 3rem);
	line-height: 1.12;
}

.aa-editorial-page h3 {
	margin: 0 0 12px;
	font-size: clamp(1.35rem, 2vw, 1.75rem);
	line-height: 1.22;
}

.aa-editorial-page p,
.aa-editorial-page li {
	font-size: 1.05rem;
	line-height: 1.75;
}

.aa-editorial-section > p:not(.aa-editorial-eyebrow),
.aa-editorial-page--legal .aa-editorial-section > p {
	max-width: 800px;
}

.aa-editorial-eyebrow,
.aa-editorial-updated {
	margin: 0 0 12px;
	color: var(--color-accent, #b88a4e);
	font-size: 0.75rem !important;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.4 !important;
	text-transform: uppercase;
}

.aa-editorial-updated {
	margin-bottom: 26px;
}

.aa-editorial-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin: 28px 0 22px;
}

.aa-editorial-card {
	min-height: 100%;
	padding: clamp(24px, 3vw, 34px);
	border: 1px solid rgba(184, 138, 78, 0.24);
	border-radius: 18px;
	background: #f7f1ea;
}

.aa-editorial-card p:last-child {
	margin-bottom: 0;
}

.aa-editorial-muted {
	color: #6b655e;
	font-size: 0.95rem !important;
}

.aa-editorial-note {
	margin: clamp(44px, 6vw, 72px) 0;
	padding: clamp(30px, 5vw, 54px);
	border-radius: 20px;
	background: #1b1a18;
	color: #f8f3ec;
}

.aa-editorial-note h2,
.aa-editorial-note p {
	color: inherit;
}

.aa-editorial-note a {
	color: #e1b77d;
	text-decoration-color: currentColor;
}

.aa-editorial-note--light {
	border: 1px solid rgba(184, 138, 78, 0.26);
	background: #f3e9df;
	color: #1b1a18;
}

.aa-editorial-note--light a {
	color: #7e572d;
}

.aa-editorial-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin: 28px 0 32px;
	padding: 0;
	list-style: none;
	counter-reset: allure-return-step;
}

.aa-editorial-steps li {
	position: relative;
	padding: 26px 24px 24px;
	border-top: 2px solid var(--color-accent, #b88a4e);
	background: rgba(247, 241, 234, 0.72);
	counter-increment: allure-return-step;
}

.aa-editorial-steps li::before {
	display: block;
	margin-bottom: 18px;
	color: var(--color-accent, #b88a4e);
	font-family: var(--font-heading, Fraunces, Georgia, serif);
	font-size: 1.65rem;
	content: "0" counter(allure-return-step);
}

.aa-editorial-steps strong,
.aa-editorial-steps span {
	display: block;
}

.aa-editorial-steps strong {
	margin-bottom: 8px;
	color: var(--text-heading, #1b1a18);
}

.aa-editorial-steps span {
	color: #625d57;
	font-size: 0.95rem;
	line-height: 1.6;
}

.aa-editorial-contact {
	margin: 0;
	padding: 24px 0 8px;
	font-family: var(--font-heading, Fraunces, Georgia, serif);
	font-size: clamp(1.25rem, 2vw, 1.55rem) !important;
}

@media (max-width: 767px) {
	.aa-editorial-grid,
	.aa-editorial-steps {
		grid-template-columns: 1fr;
	}

	.aa-editorial-card,
	.aa-editorial-note {
		border-radius: 14px;
	}

	.aa-editorial-page p,
	.aa-editorial-page li {
		font-size: 1rem;
	}
}
