/*
Theme Name: Uminex Child
Theme URI: https://floresgrup.ro/
Description: Child theme for Uminex. All Flores Grup customizations go here so they survive parent theme updates.
Author: Flores Grup
Template: uminex
Version: 1.6.0
License: GNU General Public License v2 or later
Text Domain: uminex-child
*/

/* ==========================================================================
   Brand logo
   The theme outputs the logo at its full intrinsic size (403x160), so the
   display size is set here. The file is deliberately ~2.8x the display height
   so it stays sharp on high-density screens.
   ========================================================================== */

.logo .logo-image img {
	height: 56px;
	width: auto;
	max-width: 100%;
}

@media (max-width: 991px) {
	.logo .logo-image img {
		height: 46px;
	}
}

@media (max-width: 575px) {
	.logo .logo-image img {
		height: 38px;
	}
}

/* ==========================================================================
   Footer logo
   The footer is an Elementor template (ovic_footer post 3607) whose image
   widget carries no width, so it would render the logo at its full 403px.
   Scoped to that widget's element id so the payment-icon image widget in the
   same footer is not affected. Matches the header height.
   ========================================================================== */

.footer .elementor-element-1b27cd1 img {
	height: 56px;
	width: auto;
}

@media (max-width: 991px) {
	.footer .elementor-element-1b27cd1 img {
		height: 46px;
	}
}

/* ==========================================================================
   Homepage: uniform square thumbnails
   The ovic_products widget is configured with a custom thumb height of 762px
   and no width, so WooCommerce serves 600x762, 341x731, ... — every card ends
   up a different width and the titles and prices no longer line up. Lock the
   image area to a 250px square and let the picture fit inside it with
   object-fit: contain, so nothing is cropped or stretched.
   Scoped to .home, and to the category-box widget by element id so the
   Instagram grid above it keeps its own sizing.
   ========================================================================== */

.home .ovic-products .product-thumb .thumb-wrapper {
	max-width: 250px;
	margin-left: auto;
	margin-right: auto;
}

.home .ovic-products .product-thumb .thumb-link {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.home .ovic-products .product-thumb .primary-thumb {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
}

.home .ovic-products .product-thumb .primary-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

/* Category boxes ("Top Offers-Deals") — same treatment */
.home .elementor-element-016c44c .item .image {
	display: block;
	width: 100%;
	max-width: 250px;
	margin-left: auto;
	margin-right: auto;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.home .elementor-element-016c44c .item .image > * {
	display: block;
	width: 100%;
	height: 100%;
}

.home .elementor-element-016c44c .item .image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

/* Keep the product title block a consistent height so prices align even when
   a name wraps onto a second line. */
.home .ovic-products .product-info .product-title {
	min-height: 2.8em;
}

/* ==========================================================================
   Header logo click target
   In header style-06 the theme sets `.box-nav-vertical { position: static }`,
   so the absolutely positioned category panel resolves its `left: 0` against
   a full-width ancestor instead of the hamburger button — it lands over the
   logo. The theme also forces that panel `visibility: visible !important`,
   with z-index 10. While the categories menu was empty the panel had no
   height and nothing was covered; with 91 items it swallows the logo click.
   Restoring the containing block puts the panel back under its button, and
   the logo is lifted above it as belt-and-braces.
   ========================================================================== */

.header.style-06 .box-nav-vertical {
	position: relative;
}

.logo,
.logo .logo-image {
	position: relative;
	z-index: 20;
}

/* ==========================================================================
   Breadcrumb alignment on Elementor-built pages
   The theme's .container is max-width 1750px (1690px inside its 30px padding)
   and .page-head sits directly in it, while Elementor's boxed sections are
   capped at 1140px and centred. On a 1920px screen that left the breadcrumb
   starting ~275px to the left of the page's own text — visible on Despre noi
   and Contact. Matching .page-head to the Elementor content width lines the
   two up, the way they already line up on the shop page (which is not an
   Elementor document and so keeps the full container width).

   body.elementor-page is set only when the page itself is built with
   Elementor, so the shop, the legal pages and every plain page are untouched,
   and any future Elementor page is covered automatically. max-width alone is
   a no-op below ~1200px, where both columns already fill the same space.
   ========================================================================== */

body.elementor-page .site-container > .page-head {
	max-width: 1140px;
	margin-inline-start: auto;
	margin-inline-end: auto;
}

/* ==========================================================================
   Top-bar notice: a label, not a link
   The theme prints class="disable-link" on menu items that have no real
   destination but never styles or scripts it — there is no rule for it in
   uminex/assets/css/style.css and no handler in frontend.js. The B2B notice in
   the top bar has to carry href="#" because the REST API refuses to save a
   custom menu item without a URL, so without this it would be clickable and
   jump the page to the top. Making it inert is what the class was meant to do.
   ========================================================================== */

.header-submenu a.disable-link {
	cursor: default;
	pointer-events: none;
}

/* ==========================================================================
   Top bar: centre the B2B notice now that it is the only thing there
   The bar is a flex row of .header-start (the notice) and .header-end (which
   used to hold three links). The theme gives both `flex: 1 1 auto`, so with
   .header-end emptied the notice stayed pinned to the left half. Letting
   .header-end size to its content collapses it, .header-start then fills the
   bar, and the menu centres its own item.

   The :has() rule only hides .header-end while it holds no menu item, so if
   links are ever added back there they reappear instead of being invisibly
   suppressed. Browsers without :has() fall back to the flex rule above it,
   which already gives an empty container zero width.
   ========================================================================== */

.header-top .header-inner > .header-end {
	flex: 0 1 auto;
}

.header-top .header-inner > .header-end:not(:has(.menu-item)) {
	display: none;
}

.header-top .header-start .header-submenu {
	justify-content: center;
	text-align: center;
}

/* ==========================================================================
   Product code under the product name in listings
   Printed by uminex_child_loop_product_sku() at priority 4 on
   woocommerce_after_shop_loop_item_title, so it lands between the title and
   the price in all three loop templates (style-01 on the shop, style-05 on
   the front page, list view). Italic and muted so it reads as a reference
   rather than competing with the name, with the code itself a shade darker so
   it stays scannable. Negative top margin pulls it up against the title,
   which carries the theme's own bottom margin.
   ========================================================================== */

.product-item .product-loop-sku {
	display: block;
	margin: -6px 0 8px;
	font-size: 16px;
	font-style: italic;
	font-weight: 400;
	line-height: 1.4;
	color: #1451C4;
	letter-spacing: .02em;
}

/* The whole line is blue. #1451C4 measures 6.99:1 on white, so unlike the
   brand orange it was set in before (2.52:1) it clears WCAG AA for the 12px
   size this renders at. Deliberately not the theme's old demo indigo
   (#2B38D1), which was removed from the site on purpose. */
.product-item .product-loop-sku__code {
	color: inherit;
	font-weight: 700;
	font-style: italic;
	white-space: nowrap;
}

/* On the front page the title block is given a min-height above, which butts
   the code straight up against the name. Cancel the negative pull there and
   add a small gap instead. */
.home .ovic-products .product-item .product-loop-sku {
	margin-top: 5px;
}

/* List view puts the title in .info-start with tighter spacing of its own. */
.product-item.list .product-loop-sku {
	margin: -2px 0 10px;
}

/* ==========================================================================
   Product code on the single product page
   The theme prints it as .product-metas .sku_wrapper > .title + .sku. Only the
   value is recoloured; the "Cod produs:" label keeps the theme's styling so it
   still matches the category and tag rows sitting directly beneath it.
   ========================================================================== */

.product-metas .sku_wrapper .sku {
	color: #1451C4;
	font-weight: 700;
}

/* ==========================================================================
   Dual price: net headline, gross underneath
   Built by uminex_child_price_two_ways() on woocommerce_get_price_html, so it
   applies in the loop, on the single product page, in related products and in
   the product widgets from one place.

   Two things about the theme's own price markup drive everything here. Its
   `.amount` is `display: inline-block; vertical-align: top` and takes its size
   from `--price-fz` rather than from an inherited font-size — so plain em
   sizing on a wrapper never reached the figure at all, and the label sat on the
   baseline while the figure hung from the top of the line box, which is why the
   label looked dropped.

   So the pair is scaled through the theme's own variable instead. `--price-fz`
   is captured once as `--pb` (self-referencing a custom property is a cycle and
   would be dropped), then both lines derive from it. That keeps the ratio in
   every context, and the theme sets a different value in each: 14px on the
   front-page style-05 cards, 18px in the shop, 24px on the single product page,
   plus responsive steps under each. Hardcoded pixels would break all but one.
   ========================================================================== */

.price-b2b {
	--pb: var(--price-fz, 18px);
	display: block;
	line-height: 1.25;
}

.price-b2b__net {
	--price-fz: calc(var(--pb) * 1.35);
	--price-lh: calc(var(--pb) * 1.6);
	display: block;
	font-size: calc(var(--pb) * 1.35);
	font-weight: 700;
}

/* Put the figures back on the baseline so the label sits level with the one it
   belongs to. An inline-block's baseline is its last line box's baseline, i.e.
   the text baseline, which is exactly what the label aligns to. Applied to both
   lines so it keeps working whichever one carries the label. */
.price-b2b .amount {
	vertical-align: baseline;
}

.price-b2b__gross,
.price-b2b__gross .woocommerce-Price-amount,
.price-b2b__gross bdi,
.price-b2b__gross .woocommerce-Price-currencySymbol {
	color: #8F9599;
	font-weight: 400;
}

.price-b2b__gross {
	--price-fz: calc(var(--pb) * .72);
	--price-lh: calc(var(--pb) * 1.05);
	display: block;
	margin-top: 1px;
	font-size: calc(var(--pb) * .72);
	font-weight: 400;
}

/* The label takes size, weight and colour from the line it sits on, so it is
   typographically identical to the figure beside it rather than a smaller
   annotation. */
.price-b2b__tag {
	margin-left: 6px;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
	white-space: nowrap;
	vertical-align: baseline;
}

/* Add further custom CSS below this line. */
