/*
Theme Name: Martfury Child
Theme URI: http://drfuri.com/unero
Author: DrFuri
Author URI: http://drfuri.com
Description: Martfury Child Theme for Miniqa: scroll-loaded product sections, Load more on shop pages, speed tweaks, Miniqa styling.
Version: 1.7.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
*/

/* ==========================================================================
   Miniqa styling (moved from Customizer → Additional CSS)
   Colours come from the variables below: change a colour once here.
   ========================================================================== */

:root {
	--mq-orange: #F49D21;        /* Miniqa Orange (brand primary) */
	--mq-orange-dark: #D27F00;   /* hover / pressed */
	--mq-orange-text: #AE6400;   /* orange text on white (passes contrast) */
	--mq-teal: #2497A1;          /* Miniqa Teal */
	--mq-ink: #161A1B;           /* text */
	--mq-muted: #757579;         /* secondary text */
	--mq-line: #CCCCCC;          /* dividers */
	--mq-border: #A3A3A6;        /* input borders */
	--mq-sale: #FF3300;          /* deal prices */
	--mq-white: #FFFFFF;
	--mq-page-bg: #F1F1F2;       /* light grey page background, white cards on top (Jumia style) */
	--mq-card-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	--mq-gap: 16px;              /* space between cards */
	--mq-radius: 4px;
	--mq-radius-lg: 6px;
}

/* ---------- Page background and white cards ---------- */

body {
	background-color: var(--mq-page-bg);
}

/* Header and footer stay white unless a colour is set in the Customizer (zero-specificity defaults). */
:where(.site-header),
:where(.site-footer) {
	background-color: var(--mq-white);
}

/* Shop and category pages */
.mf-catalog-page #mf-shop-content,
.mf-catalog-page .catalog-sidebar .widget {
	box-shadow: var(--mq-card-shadow);
}

/* Product page: gallery + summary, then details/tabs, then related and up-sell products */
.single-product div.product .mf-product-detail,
.single-product div.product .mf-product-summary,
.single-product .related.products,
.single-product .up-sells.products {
	padding: 20px;
	border-radius: var(--mq-radius);
	background-color: var(--mq-white);
	box-shadow: var(--mq-card-shadow);
}

.single-product div.product .mf-product-summary,
.single-product .related.products,
.single-product .up-sells.products {
	margin-top: var(--mq-gap);
}

/* Content pages, blog posts, cart, checkout and account: the main column becomes a white card.
   Pages built with Elementor keep their own design. */
body.page:not(.elementor-page):not(.home) #primary > .site-main,
body.single-post #primary > .site-main,
body.woocommerce-cart #primary > .site-main,
body.woocommerce-checkout #primary > .site-main,
body.woocommerce-account #primary > .site-main {
	padding: 24px;
	border-radius: var(--mq-radius);
	background-color: var(--mq-white);
	box-shadow: var(--mq-card-shadow);
}

/* Blog and page sidebars */
.primary-sidebar:not(.catalog-sidebar) .widget {
	margin-bottom: var(--mq-gap);
	padding: 16px;
	border-radius: var(--mq-radius);
	background-color: var(--mq-white);
	box-shadow: var(--mq-card-shadow);
}

@media (max-width: 767px) {
	.single-product div.product .mf-product-detail,
	.single-product div.product .mf-product-summary,
	.single-product .related.products,
	.single-product .up-sells.products,
	body.page:not(.elementor-page):not(.home) #primary > .site-main,
	body.single-post #primary > .site-main,
	body.woocommerce-cart #primary > .site-main,
	body.woocommerce-checkout #primary > .site-main,
	body.woocommerce-account #primary > .site-main {
		padding: 14px;
	}
}

/* ---------- Header ---------- */

.topbar .topbar-row {
	height: 30px;
}

.site-header .header-main {
	padding: 5px 0;
}

.site-header .extras-menu > li .extra-icon:hover {
	color: var(--mq-orange);
}

.sticky-header .site-header.minimized.sticky-header-logo .header-main .sticky-logo {
	width: 150px;
	height: 33px;
}

/* Search box */
.site-header .product-extra-search .search-field {
	margin: 0 5px;
	border: 1px solid var(--mq-border);
	border-radius: var(--mq-radius);
}

.site-header .product-extra-search .product-cat-label.no-cats {
	border: none;
}

.site-header .product-extra-search .search-submit {
	border-radius: var(--mq-radius);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.site-header .product-extra-search .search-submit:hover {
	background-color: var(--mq-orange-dark);
}

/* Mini cart */
.site-header .extras-menu .menu-item-cart .mini-cart-content img {
	width: 80px;
	height: 80px;
	object-fit: contain;
}

/* "Shop by department" menu */
.site-header .products-cats-menu .toggle-product-cats .menu {
	width: 218px;
	border: none;
	border-radius: var(--mq-radius-lg);
	background-color: var(--mq-white);
}

.site-header .products-cats-menu .menu > li > a {
	font-size: 1em;
}

/* Mega menu */
.site-header .products-cats-menu .menu li.is-mega-menu .dropdown-submenu {
	border-top: none;
	border-bottom: none;
	border-radius: var(--mq-radius);
	box-shadow: 5px 5px 10px #888888;
}

.site-header .menu .is-mega-menu .dropdown-submenu .menu-item-mega > a {
	display: block;
	padding-bottom: 4px;
	border-bottom: 1px solid var(--mq-line);
	font-size: 1.4rem;
	text-transform: uppercase;
}

.nav .menu .is-mega-menu .dropdown-submenu .mega-menu-submenu .sub-menu li > a {
	color: var(--mq-muted);
	font-size: 1.2rem;
	font-weight: 400;
	line-height: 1.4;
	transition: color 0.3s ease;
}

.nav .menu .is-mega-menu .dropdown-submenu .mega-menu-submenu .sub-menu li > a:hover {
	color: var(--mq-orange);
}

/* Top promotion bar */
.top-promotion.style-2 .promotion-content {
	width: 100%;
	padding: 2.5% 0;
}

/* ---------- Homepage product carousels ---------- */

.mf-products-top-carousel {
	border-radius: 0 0 var(--mq-radius) var(--mq-radius);
	background-color: var(--mq-white);
}

.mf-products-top-carousel .carousel-header {
	margin: 0 0 5px;
	padding: 6px;
	border-radius: var(--mq-radius) var(--mq-radius) 0 0;
	background-color: var(--mq-orange);
}

.mf-products-top-carousel .carousel-header .title {
	color: var(--mq-white);
	font-size: 1.4em;
	font-weight: 500;
}

.mf-products-carousel .cat-header,
.mf-product-deals-day .cat-header {
	margin: 0;
	border: none;
	border-radius: var(--mq-radius-lg) var(--mq-radius-lg) 0 0;
	background-color: var(--mq-orange);
}

.mf-products-carousel .cat-header .cat-title {
	padding: 9px;
	color: var(--mq-white);
	font-size: 1.6em;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 1px;
}

.mf-products-carousel .cat-header .extra-links li a {
	color: var(--mq-ink);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 1px;
}

.mf-products-carousel .cat-header .extra-links li a:hover {
	color: var(--mq-white);
}

.mf-products-carousel ul.products,
.mf-product-deals-day .products-content {
	width: 100%;
	padding: 5px;
	border-radius: 0 0 var(--mq-radius-lg) var(--mq-radius-lg);
	background: var(--mq-white);
}

.mf-product-deals-day ul.products li.product .price ins {
	color: var(--mq-sale);
	font-size: 16px;
}

/* ---------- Product cards (all product lists) ---------- */

.woocommerce ul.products li.product h2 a,
.woocommerce ul.products li.product .woo-loop-product__title a {
	display: -webkit-box;
	max-width: 300px;
	overflow: hidden;
	color: var(--mq-ink);
	font-size: 1.2rem;
	text-overflow: ellipsis;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

/* "Bulk discounts" tag on product cards (inc/bulk-pricing.php) */
.mq-bulk-tag {
	display: inline-block;
	margin-top: 4px;
	padding: 1px 6px;
	border-radius: 3px;
	background: #ECFAFB;
	color: #00646D;
	font-size: 11px;
	font-weight: 700;
}

/* ---------- Shop and category pages ---------- */

.mf-catalog-page .site-content {
	padding-bottom: 20px;
}

.woocommerce .shop-toolbar {
	border-radius: var(--mq-radius);
	background-color: var(--mq-orange);
}

.woocommerce .mf-toolbar-empty-space {
	height: 4px;
}

#mf-shop-content {
	border-radius: var(--mq-radius);
	background-color: var(--mq-white);
}

/* Category descriptions: now shown full width at the bottom of the page (inc/archive-description.php). */

/* Sidebar filter widgets */
.catalog-sidebar .widget {
	border-radius: var(--mq-radius);
	background-color: var(--mq-white);
	font-size: 0.875em;
}

.catalog-sidebar .widget .widget-title {
	font-size: 1em;
	font-weight: 700;
}

/* ---------- Single product page ---------- */

.woocommerce div.product form.cart .button {
	margin: 3px;
}

/* ---------- Footer ---------- */

.social-links-widget .share-tiktok,
.social-links-widget .share-twitter {
	color: var(--mq-white);
}

/* ---------- Responsive ---------- */

/* Phones and small tablets */
@media (max-width: 767px) {
	.woocommerce .shop-toolbar {
		padding: 0 6px;
	}
}

@media (max-width: 480px) {
	.woocommerce .shop-toolbar {
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nav .menu .is-mega-menu .dropdown-submenu .mega-menu-submenu .sub-menu li > a {
		transition: none;
	}
}

/* ---------- Smooth page changes (Chrome, Edge, Safari 18+) ---------- */
/* With the "instant pages" prerendering in inc/speed.php, moving between pages feels like an app. */
@media (prefers-reduced-motion: no-preference) {
	@view-transition {
		navigation: auto;
	}
}
