/*
Theme Name: Shoptimizer Child Theme
Theme URI:
Description: Child theme of Shoptimizer
Author: CommerceGurus
Author URI:
Template: shoptimizer
Version: 1.2.2
License:         	GNU General Public License v2 or later
License URI:     	http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   IVONIX CUSTOMIZATIONS
   Brand navy: #192465
   Sections below are added incrementally. Each block is labelled so it can
   be reviewed/rolled back independently.
   ========================================================================== */

:root{
	--ivx-navy:#192465;
	--ivx-navy-2:#141d52;   /* nav row, slightly darker for depth */
	--ivx-accent:#dc9814;   /* existing gold accent (cart count, search btn) */
}

/* ==========================================================================
   PHASE 1 — NEWEGG-STYLE NAVY HEADER
   ========================================================================== */

/* ---- Whole header navy ---- */
.site-header,
body:not(.header-4) .site-header,
.main-header{
	background-color:var(--ivx-navy) !important;
}

/* ---- Logo: swap dark logo for white version (transparent) ---- */
.site-header .custom-logo-link img,
.site-header img.custom-logo{
	content:url("assets/ivonix-logo-white.png");
	width:auto !important;
	max-height:48px;
}

/* ---- Search field: prominent white pill with gold Search button ---- */
.site-search .woocommerce-product-search{
	position:relative;
	display:block;
	margin:0;
}
.site-search input.search-field{
	width:100% !important;
	height:48px !important;
	border:none !important;
	border-radius:6px !important;
	padding:0 116px 0 18px !important;
	font-size:15px !important;
	background:#fff !important;
	color:#222 !important;
	box-shadow:none !important;
	-webkit-appearance:none;
}
.site-search input.search-field::placeholder{ color:#777 !important; opacity:1; }
.site-search .woocommerce-product-search button[type="submit"]{
	display:flex !important;
	align-items:center !important;
	justify-content:center !important;
	position:absolute !important;
	top:4px !important; right:4px !important; bottom:4px !important;
	width:104px !important; height:auto !important;
	margin:0 !important; padding:0 !important;
	border:none !important; border-radius:4px !important;
	background:var(--ivx-accent) !important;
	color:#fff !important;
	font-size:14px !important; font-weight:600 !important;
	letter-spacing:.2px; cursor:pointer !important;
	text-indent:0 !important; overflow:visible !important;
}
.site-search .woocommerce-product-search button[type="submit"]:hover{
	background:#c8870f !important;
}

/* ---- Cart: white text/icon on navy ---- */
.shoptimizer-cart .cart-contents,
.shoptimizer-cart .cart-contents .amount,
.shoptimizer-cart .woocommerce-Price-amount,
.shoptimizer-cart-icon i{ color:#fff !important; }
.shoptimizer-cart-icon svg{ stroke:#fff !important; }

/* ---- Custom account block (Sign In / Register + Orders) ---- */
.ivonix-header-account{
	display:flex;
	align-items:center;
	gap:22px;
	white-space:nowrap;
}
.ivonix-header-account .ivx-acc-link{
	display:flex;
	align-items:center;
	gap:8px;
	color:#fff !important;
	line-height:1.1;
}
.ivonix-header-account .ivx-acc-link:hover{ opacity:.8; }
.ivonix-header-account .ivx-acc-icon{ stroke:#fff; flex:0 0 auto; }
.ivonix-header-account .ivx-acc-text{ display:flex; flex-direction:column; }
.ivonix-header-account .ivx-acc-text small{ font-size:11px; opacity:.8; font-weight:400; }
.ivonix-header-account .ivx-acc-text strong{ font-size:14px; font-weight:600; }

/* ==========================================================================
   DESKTOP HEADER LAYOUT (>= 993px)
   ========================================================================== */
@media (min-width:993px){
	/* top row as a flex bar: logo | search | account | cart */
	.main-header.col-full{
		display:flex !important;
		align-items:center;
		gap:26px;
		padding-top:14px !important;
		padding-bottom:14px !important;
	}
	.main-header .site-branding{ order:0; flex:0 0 auto; margin:0; }
	.main-header .site-search{ order:1; flex:1 1 auto; max-width:680px; margin:0; }
	.main-header .ivonix-header-account{ order:2; flex:0 0 auto; margin-left:auto; }
	.main-header .site-header-cart{ order:3; flex:0 0 auto; display:flex !important; align-items:center; margin:0; }

	/* nav row: navy, categories only (hide duplicate search + cart) */
	.col-full-nav{ background-color:var(--ivx-navy-2) !important; }
	.col-full-nav .site-search{ display:none !important; }
	.col-full-nav .site-header-cart{ display:none !important; }

	/* category links: crisp white */
	.menu-primary-menu-container > ul > li > a,
	.menu-primary-menu-container > ul > li.nolink > span{ color:#fff !important; }
}

/* ==========================================================================
   MOBILE HEADER ( <= 992px )
   ========================================================================== */
@media (max-width:992px){
	/* keep mobile clean: hide the text account block (account lives in mobile menu) */
	.ivonix-header-account{ display:none !important; }
	/* logo white version already applied; ensure it fits mobile bar */
	.site-header .custom-logo-link img,
	.site-header img.custom-logo{ max-height:30px; }

	/* hamburger: transparent on navy, white bars + white label */
	.site-branding button.menu-toggle,
	.site-branding button.menu-toggle:hover,
	.m-search-bh .site-search,
	.m-search-toggled .site-search{ background-color:transparent !important; }
	.menu-toggle .bar{ background-color:#fff !important; }
	.menu-toggle .bar-text,
	.menu-toggle:hover .bar-text{ color:#fff !important; }

	/* mobile search + account toggle icons white */
	.mobile-search-toggle svg,
	.shoptimizer-myaccount svg{ stroke:#fff !important; }
}
