/*
Theme Name: Martfury Child
Theme URI: http://drfuri.com/unero
Author: DrFuri
Author URI: http://drfuri.com
Description: Martfury Child Theme.
Version: 1.0
License: GNU General Public License v2+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: martfury
Domain Path: /lang/
Tags: one-column, two-columns, left-sidebar, right-sidebar, full-width-template, post-formats, theme-options, threaded-comments, translation-ready
Template: martfury
*/

/* ============================================================
   Daqi mobile UI polish (product/category grid, spacing, type)
   Scope: <= 767px only. Loaded after the parent theme, so it wins.
   The grid rules only touch #mf-shop-content (archive/category loop)
   to avoid breaking Elementor/Slick carousels on the homepage.
   ============================================================ */
@media (max-width: 767px) {

	/* ---------- Global typography ---------- */
	body { font-size: 14px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
	.site-content { font-size: 14px; }
	h1, .woocommerce-products-header__title { font-size: 22px; line-height: 1.3; }
	h2 { font-size: 19px; line-height: 1.35; }
	h3 { font-size: 17px; line-height: 1.4; }
	p { line-height: 1.7; }

	/* ---------- Spacing / whitespace ---------- */
	.site-content > .container,
	.site-content .container,
	.site-content .mf-container { padding-left: 12px; padding-right: 12px; }
	.woocommerce-products-header { margin-bottom: 12px; }
	.woocommerce-products-header__title { margin: 0 0 8px; }
	.woocommerce-breadcrumb { font-size: 12px; margin-bottom: 10px; }
	.term-description { font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
	.woocommerce-result-count,
	.woocommerce-ordering { margin-bottom: 12px; font-size: 13px; }

	/* ---------- Product / category grid: 2 clean columns ---------- */
	#mf-shop-content ul.products {
		display: flex;
		flex-wrap: wrap;
		align-items: stretch;
		margin-left: -6px;
		margin-right: -6px;
	}
	#mf-shop-content ul.products::before,
	#mf-shop-content ul.products::after { display: none; }

	#mf-shop-content ul.products li.product {
		display: flex;
		float: none !important;
		clear: none !important;
		width: 50% !important;
		max-width: 50% !important;
		flex: 0 0 50%;
		margin: 0 0 12px !important;
		padding: 0 6px !important;
	}

	#mf-shop-content ul.products li.product .product-inner {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		width: 100%;
		height: auto;
		margin: 0;
		padding: 10px 10px 12px;
		border: 1px solid #ececec;
		border-radius: 8px;
		background: #fff;
		overflow: hidden;
	}
	#mf-shop-content ul.products li.product .product-inner:hover { border-color: #e0e0e0; }

	/* ---------- Thumbnail: uniform square ---------- */
	#mf-shop-content ul.products li.product .mf-product-thumbnail {
		position: relative;
		overflow: hidden;
		border-radius: 6px;
	}
	#mf-shop-content ul.products li.product .mf-product-thumbnail > a { display: block; }
	#mf-shop-content ul.products li.product a img {
		width: 100% !important;
		height: auto;
		aspect-ratio: 1 / 1;
		object-fit: cover;
		border-radius: 6px;
		margin: 0;
	}
	/* hide hover-only overlays (there is no hover on touch devices) */
	#mf-shop-content ul.products li.product .mf-product-thumbnail .footer-button,
	#mf-shop-content ul.products li.product .mf-product-details-hover { display: none !important; }

	/* ---------- Details + title (2-line clamp) ---------- */
	#mf-shop-content ul.products li.product .mf-product-details {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		position: relative;
	}
	#mf-shop-content ul.products li.product .mf-product-content { flex: 1 1 auto; }
	#mf-shop-content ul.products li.product .woo-loop-product__title {
		margin: 8px 0 4px !important;
		font-size: 13px !important;
		line-height: 1.4 !important;
		font-weight: 500;
		min-height: calc(1.4em * 2);
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	#mf-shop-content ul.products li.product .woo-loop-product__title a {
		color: #222;
		font-size: inherit;
		line-height: inherit;
	}
	#mf-shop-content ul.products li.product .woocommerce-product-details__short-description { display: none; }

	/* ---------- Price ---------- */
	#mf-shop-content ul.products li.product .mf-product-price-box { margin-top: auto; }
	#mf-shop-content ul.products li.product .price,
	#mf-shop-content ul.products li.product .price .woocommerce-Price-amount {
		font-size: 15px !important;
		font-weight: 700;
		color: var(--mf-primary-color, #fcb800);
		margin: 0 0 8px;
	}

	/* ---------- Add-to-cart: always visible on touch ---------- */
	#mf-shop-content ul.products li.product .mf-product-price-box .footer-button { display: block; }
	#mf-shop-content ul.products li.product .mf-product-price-box .footer-button .button {
		display: block;
		width: 100%;
		padding: 8px 10px;
		font-size: 12px;
		font-weight: 600;
		line-height: 1.2;
		text-align: center;
		border-radius: 6px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	#mf-shop-content ul.products li.product .mf-product-price-box .footer-button .button i { margin-right: 4px; }

	/* ---------- Category tiles ---------- */
	#mf-shop-content ul.products li.product.product-category .product-inner { padding-bottom: 14px; }
	#mf-shop-content ul.products li.product.product-category .woocommerce-loop-category__title { font-size: 13px; }

	/* ---------- Pagination ---------- */
	#mf-shop-content .woocommerce-pagination { margin-top: 8px; }
	#mf-shop-content .woocommerce-pagination ul li .page-numbers { min-width: 32px; height: 32px; line-height: 32px; font-size: 13px; }
}

@media (max-width: 380px) {
	#mf-shop-content ul.products li.product .woo-loop-product__title { font-size: 12px !important; }
	#mf-shop-content ul.products li.product .price,
	#mf-shop-content ul.products li.product .price .woocommerce-Price-amount { font-size: 14px !important; }
	.site-content .container,
	.site-content .mf-container { padding-left: 10px; padding-right: 10px; }
}

/* ============================================================
   Homepage "Top Categories Of The Month": uniform category images
   The 6 martfury-image-box widgets used mixed photo sizes, making
   the grid look messy. Force every thumbnail to the same size.
   ============================================================ */
.mf-elementor-image-box { align-items: flex-start; }
.mf-elementor-image-box > a.thumbnail {
	flex: 0 0 150px;
	width: 150px;
	height: 150px;
	max-width: 150px;
	overflow: hidden;
	border-radius: 6px;
}
.mf-elementor-image-box > a.thumbnail > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
}
.mf-elementor-image-box .image-content { flex: 1 1 auto; min-width: 0; }

@media (max-width: 1024px) {
	.elementor-position--tablettop .mf-elementor-image-box > a.thumbnail {
		flex-basis: auto;
		width: 100%;
		height: 200px;
		max-width: none;
	}
}

@media (max-width: 767px) {
	.mf-elementor-image-box > a.thumbnail {
		flex: 0 0 104px;
		width: 104px;
		height: 104px;
		max-width: 104px;
	}
}
