/*
Whiteplate U4 — mobile/tablet storefront polish
Version: 0.28.0
Gutters, overflow, tap targets, empty cart/search chrome.
Does NOT redesign Elementor homepage layout.
*/

/* ---- Global overflow / gutters ---------------------------------------- */
html {
	overflow-x: clip;
}
body.whiteplate-shop-surface,
body.whiteplate-front {
	overflow-x: clip;
}

body.whiteplate-shop-surface {
	--wp-gutter-x: clamp(16px, 3vw, 40px);
}

body.whiteplate-shop-surface .wd-page-content.main-page-wrapper,
body.whiteplate-shop-surface .wd-content-area.site-content {
	box-sizing: border-box;
	max-width: 100%;
}

body.woocommerce-cart .wd-content-area.site-content,
body.woocommerce-checkout .wd-content-area.site-content,
body.woocommerce-account .wd-content-area.site-content {
	padding-inline: var(--wp-gutter-x, clamp(16px, 3vw, 40px));
	box-sizing: border-box;
}

/* Tap targets — header tools / mega / filters / ATC */
@media (max-width: 1024px) {
	body {
		--wp-gutter-x: clamp(12px, 4vw, 20px);
	}

	.whb-general-header .wd-tools-element > a,
	.whb-general-header .wd-header-cart > a,
	.whb-general-header .wd-header-my-account > a,
	.whb-general-header .wd-header-wishlist > a,
	.whb-general-header .wd-header-search > a,
	.wp-mega-trigger,
	.wp-mega-close,
	.wp-mega-expand,
	.wp-filter-mobile-toggle,
	.wp-shop-empty-shop,
	.wp-shop-empty-suggest a,
	.return-to-shop .button,
	.woocommerce a.button,
	.woocommerce button.button {
		min-height: 44px;
		min-width: 44px;
	}

	.wp-mega-top,
	.wp-mega-parent,
	.wp-mega-sub {
		min-height: 44px;
	}

	/* Prevent full-bleed stretch helpers from causing horizontal scroll */
	.whiteplate-shop-surface [class*="wd-section-stretch"],
	.whiteplate-shop-surface .wd-page-content,
	.whiteplate-shop-surface .container {
		max-width: 100%;
		box-sizing: border-box;
	}

	.whiteplate-shop-surface .container {
		padding-inline: var(--wp-gutter-x);
	}
}

/* ---- Empty cart (Brand Book, Persian) --------------------------------- */
body.woocommerce-cart .cart-empty,
body.woocommerce-cart .wd-empty-block-title,
body.woocommerce-cart .wc-empty-cart-message {
	text-align: center;
	font-size: 1.25rem;
	font-weight: 800;
	color: #333;
	margin: 28px auto 8px;
	max-width: 420px;
}

body.woocommerce-cart .wd-empty-block-text,
body.woocommerce-cart .cart-empty + p,
body.woocommerce-cart .wd-empty-page p {
	text-align: center;
	color: #A1927D;
	font-size: 14px;
	line-height: 1.8;
	max-width: 420px;
	margin: 0 auto 18px;
}

body.woocommerce-cart .return-to-shop {
	text-align: center;
	margin: 8px auto 48px;
}

body.woocommerce-cart .return-to-shop .button,
body.woocommerce-cart .return-to-shop a.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 28px;
	border-radius: 12px !important;
	background: #FF5F23 !important;
	border-color: #FF5F23 !important;
	color: #fff !important;
	font-weight: 800;
}

body.woocommerce-cart .return-to-shop .button:hover {
	background: #E04E1A !important;
	border-color: #E04E1A !important;
}

body.woocommerce-cart .wd-empty-page,
body.woocommerce-cart .woocommerce-cart-form__contents,
body.woocommerce-cart .entry-content > .woocommerce {
	padding-block: 12px 24px;
}

/* Soft sand canvas behind empty cart */
body.woocommerce-cart.whiteplate-shop-surface .wd-page-content {
	background: #F7F5F0;
}

/* ---- Empty search already styled in shop.css; reinforce Brand accents - */
.wp-shop-empty-state {
	text-align: center;
	padding: 36px 16px 28px;
}
.wp-shop-empty-title {
	color: #333;
	font-weight: 800;
}
.wp-shop-empty-sub {
	color: #A1927D;
}
.wp-shop-empty-suggest a {
	border-color: #E5E0D6;
	color: #687049;
}
.wp-shop-empty-suggest a:hover {
	border-color: #687049;
	background: #F7F5F0;
}
.wp-shop-empty-shop {
	background: #FF5F23;
	color: #fff !important;
	border-radius: 12px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding: 0 22px;
}

/* ---- Logo image fallback look (shop cards + anywhere) ----------------- */
img.wp-img-fallback,
.wp-product-image.is-fallback img.wp-img-fallback,
.woocommerce-product-gallery img.wp-img-fallback {
	object-fit: contain !important;
	background: linear-gradient(180deg, #fff 0%, #DFDBCF 140%);
}

.wp-product-image.is-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}
.wp-product-image.is-fallback img.wp-img-fallback {
	width: 62%;
	height: auto;
	padding: 0;
	margin: auto;
}

/* ---- Header mobile search row spacing --------------------------------- */
@media (max-width: 1024px) {
	.wp-header-mobile-search {
		padding-inline: var(--wp-gutter-x, 12px);
		padding-bottom: 10px;
		box-sizing: border-box;
		width: 100%;
	}
	.wp-mega-bar-inner {
		padding-inline: var(--wp-gutter-x, 12px);
		box-sizing: border-box;
	}
}
