/**
 * Header vitacomoda.it — allineamento carrello/Esci, bordo oro unico,
 * shop chiaro, hamburger oro, card prodotto oro.
 */

:root {
	--vc-hdr-gold: #ffc532;
	--vc-hdr-gold-soft: rgba(255, 197, 50, 0.85);
	--vc-hdr-neon: 0 0 10px rgba(255, 197, 50, 0.28);
	--vc-hdr-pad: var(--ast-container-default-xlg-padding, 2.5em);
	--vc-hdr-max: var(--ast-normal-container-width, 1200px);
}

/* --- Pulsanti utente: SOLO bordo oro 1px --- */
.vc-header-user {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--vc-hdr-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--vc-hdr-pad);
	padding-right: var(--vc-hdr-pad);
}

.vc-header-user a,
body.vc-gaming-home .vc-header-user a,
body.vc-page-enhancer .vc-header-user a,
body.search .vc-header-user a,
body.tax-product_cat .vc-header-user a,
body.post-type-archive-product .vc-header-user a,
body.woocommerce-shop .vc-header-user a,
body.woocommerce.archive .vc-header-user a {
	border: 1px solid var(--vc-hdr-gold) !important;
	border-width: 1px !important;
	border-radius: 999px !important;
	box-shadow: var(--vc-hdr-neon) !important;
	outline: none !important;
}

/* --- Desktop: gabbia unica + layout compatto (logo|menu / ricerca|carrello|accedi) --- */
@media (min-width: 922px) {
	#ast-desktop-header .ast-primary-header-bar .ast-builder-grid-row-container,
	#ast-desktop-header .ast-primary-header-bar .ast-container,
	#ast-desktop-header .site-primary-header-wrap.ast-container,
	#ast-desktop-header .ast-below-header-bar .ast-builder-grid-row-container,
	#ast-desktop-header .ast-below-header-bar .ast-container,
	#ast-desktop-header .site-below-header-wrap .ast-builder-grid-row-container,
	#ast-desktop-header .site-below-header-wrap .ast-container {
		max-width: var(--vc-hdr-max) !important;
		width: 100% !important;
		margin-left: auto !important;
		margin-right: auto !important;
		padding-left: var(--vc-hdr-pad) !important;
		padding-right: var(--vc-hdr-pad) !important;
		box-sizing: border-box !important;
	}

	/* Riga 1: logo subito seguito dal menu (niente buco a metà schermo). */
	#ast-desktop-header .ast-primary-header-bar .ast-builder-grid-row,
	#ast-desktop-header .site-primary-header-wrap .ast-builder-grid-row {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		gap: 0.75rem 1.1rem;
		max-width: 100% !important;
		width: 100% !important;
		margin: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		box-sizing: border-box;
	}

	#ast-desktop-header .site-header-primary-section-left {
		flex: 0 0 auto !important;
		width: auto !important;
		max-width: none !important;
		justify-content: flex-start !important;
	}

	#ast-desktop-header .site-header-primary-section-right {
		flex: 1 1 auto !important;
		width: auto !important;
		min-width: 0 !important;
		justify-content: flex-start !important;
		margin-left: 0 !important;
	}

	#ast-desktop-header .ast-builder-menu-1,
	#ast-desktop-header .main-header-bar-alignment,
	#ast-desktop-header .site-navigation,
	#ast-desktop-header .main-navigation {
		width: 100% !important;
		max-width: 100% !important;
		justify-content: flex-start !important;
	}

	#ast-desktop-header .main-header-menu {
		display: flex !important;
		flex-wrap: wrap !important;
		justify-content: flex-start !important;
		align-items: center !important;
		column-gap: 0.1rem;
		row-gap: 0.15rem;
		width: 100% !important;
	}

	#ast-desktop-header .main-header-menu > .menu-item > .menu-link {
		white-space: nowrap;
	}

	/* Riga 2: ricerca elastica + cluster carrello/accedi a destra. */
	#ast-desktop-header .ast-below-header-bar .ast-builder-grid-row,
	#ast-desktop-header .site-below-header-wrap .ast-builder-grid-row {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		gap: 12px;
		max-width: 100% !important;
		width: 100% !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		margin: 0 !important;
		box-sizing: border-box;
	}

	#ast-desktop-header .site-header-below-section-left {
		flex: 1 1 auto !important;
		min-width: 0 !important;
		justify-content: flex-start !important;
	}

	#ast-desktop-header .ast-header-search,
	#ast-desktop-header .dgwt-wcas-search-wrapp {
		width: 100% !important;
		max-width: 100% !important;
	}

	#ast-desktop-header .site-header-below-section-right {
		display: flex !important;
		flex: 0 0 auto !important;
		align-items: center !important;
		justify-content: flex-end !important;
		gap: 10px;
		margin: 0 !important;
		padding: 0 !important;
		transform: none !important;
	}

	#ast-desktop-header .ast-header-woo-cart,
	#ast-desktop-header .ast-site-header-cart,
	#ast-desktop-header .ast-site-header-cart-li {
		margin: 0 !important;
		padding: 0 !important;
	}

	/* Accedi/Esci spostato via JS accanto al carrello (niente 3ª riga). */
	#ast-desktop-header .site-header-below-section-right .vc-header-user {
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 !important;
		justify-content: flex-end;
		gap: 8px;
	}

	#ast-desktop-header .site-header-below-section-right .vc-header-user a {
		padding: 6px 12px !important;
		font-size: 13px !important;
		line-height: 1.2;
		white-space: nowrap;
	}
}

/* Schermi molto larghi: menu un filo più arioso, sempre attaccato al logo. */
@media (min-width: 1280px) {
	#ast-desktop-header .main-header-menu {
		column-gap: 0.25rem;
	}

	#ast-desktop-header .main-header-menu > .menu-item > .menu-link {
		padding-left: 0.7em !important;
		padding-right: 0.7em !important;
	}
}

/* --- Ricerca: un solo bordo oro --- */
.dgwt-wcas-search-wrapp,
.dgwt-wcas-sf-wrapp {
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

.dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input,
.dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
.search-field,
#masthead input[type="search"] {
	border: 1px solid var(--vc-hdr-gold) !important;
	border-width: 1px !important;
	outline: none !important;
	box-shadow: var(--vc-hdr-neon) !important;
	border-radius: 999px !important;
}

.dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus,
.dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input:focus,
.search-field:focus {
	border-color: var(--vc-hdr-gold) !important;
	box-shadow: 0 0 14px rgba(255, 197, 50, 0.4) !important;
	outline: none !important;
}

/* --- Carrello: azzera bordi Astra/outline, poi un solo oro --- */
.ast-site-header-cart.ast-menu-cart-outline .ast-cart-menu-wrap,
.ast-site-header-cart.ast-menu-cart-with-border .ast-cart-menu-wrap,
.ast-site-header-cart .ast-cart-menu-wrap,
.ast-site-header-cart .cart-container,
.ast-site-header-cart a.cart-container,
.ast-menu-cart-outline .ast-cart-menu-wrap,
.ast-menu-cart-outline .ast-addon-cart-wrap,
.ast-menu-cart-fill .ast-addon-cart-wrap {
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

.ast-site-header-cart a.cart-container .ast-addon-cart-wrap,
.ast-site-header-cart .ast-addon-cart-wrap,
.ast-hfb-header .ast-site-header-cart .ast-addon-cart-wrap,
.ast-menu-cart-outline .ast-site-header-cart .ast-addon-cart-wrap {
	border: 1px solid #ffc532 !important;
	border-width: 1px !important;
	border-style: solid !important;
	border-color: #ffc532 !important;
	border-radius: 14px !important;
	box-shadow: 0 0 10px rgba(255, 197, 50, 0.28) !important;
	outline: 0 none !important;
	outline-offset: 0 !important;
	padding: 0.45em !important;
}

.ast-site-header-cart .count,
.ast-site-header-cart .ast-icon-shopping-cart + .count,
.ast-site-header-cart i.astra-icon:after {
	background: var(--vc-hdr-gold) !important;
	border: 0 !important;
	color: #111 !important;
	font-weight: 800 !important;
	box-shadow: none !important;
}

/* HOME scura */
body.vc-gaming-home .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input,
body.vc-gaming-home .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
body.vc-gaming-home .search-field,
body.vc-gaming-home #masthead input[type="search"] {
	background: #0c1228 !important;
	color: #f5f8ff !important;
}

body.vc-gaming-home .ast-site-header-cart .ast-addon-cart-wrap {
	background: #000 !important;
}

body.vc-gaming-home .ast-site-header-cart .ast-icon,
body.vc-gaming-home .ast-site-header-cart .ast-icon svg,
body.vc-gaming-home .ast-site-header-cart .ast-icon svg *,
body.vc-gaming-home .ast-site-header-cart a.cart-container svg,
body.vc-gaming-home .ast-site-header-cart a.cart-container svg path {
	color: #fff !important;
	fill: #fff !important;
	stroke: #fff !important;
}

/* Shop / search / archive: bianco + bordo ORO (no arancio) */
body.search:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
body.tax-product_cat:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
body.post-type-archive-product:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
body.woocommerce-shop:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
body.woocommerce.archive:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
body.vc-page-enhancer.search .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
body.vc-page-enhancer.tax-product_cat .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
body.vc-page-enhancer.post-type-archive-product .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
body.vc-page-enhancer.woocommerce-shop .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input,
body.vc-page-enhancer.woocommerce.archive .dgwt-wcas-sf-wrapp input.dgwt-wcas-search-input {
	background: #ffffff !important;
	color: #111111 !important;
	border: 1px solid var(--vc-hdr-gold) !important;
	box-shadow: var(--vc-hdr-neon) !important;
}

body.search:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier,
body.tax-product_cat:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier,
body.post-type-archive-product:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier,
body.woocommerce-shop:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier,
body.woocommerce.archive:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier,
body.search:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit svg path,
body.tax-product_cat:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit svg path,
body.post-type-archive-product:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit svg path,
body.woocommerce-shop:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit svg path,
body.woocommerce.archive:not(.vc-gaming-home) .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit svg path {
	color: var(--vc-hdr-gold) !important;
	fill: var(--vc-hdr-gold) !important;
}

body.search:not(.vc-gaming-home) .ast-site-header-cart .ast-addon-cart-wrap,
body.tax-product_cat:not(.vc-gaming-home) .ast-site-header-cart .ast-addon-cart-wrap,
body.post-type-archive-product:not(.vc-gaming-home) .ast-site-header-cart .ast-addon-cart-wrap,
body.woocommerce-shop:not(.vc-gaming-home) .ast-site-header-cart .ast-addon-cart-wrap,
body.woocommerce.archive:not(.vc-gaming-home) .ast-site-header-cart .ast-addon-cart-wrap,
body.vc-page-enhancer.search .ast-site-header-cart .ast-addon-cart-wrap,
body.vc-page-enhancer.tax-product_cat .ast-site-header-cart .ast-addon-cart-wrap,
body.vc-page-enhancer.post-type-archive-product .ast-site-header-cart .ast-addon-cart-wrap,
body.vc-page-enhancer.woocommerce-shop .ast-site-header-cart .ast-addon-cart-wrap,
body.vc-page-enhancer.woocommerce.archive .ast-site-header-cart .ast-addon-cart-wrap {
	background: #ffffff !important;
	border: 1px solid var(--vc-hdr-gold) !important;
	box-shadow: var(--vc-hdr-neon) !important;
}

body.search:not(.vc-gaming-home) .ast-site-header-cart .ast-icon svg,
body.search:not(.vc-gaming-home) .ast-site-header-cart .ast-icon svg *,
body.search:not(.vc-gaming-home) .ast-site-header-cart a.cart-container svg path,
body.tax-product_cat:not(.vc-gaming-home) .ast-site-header-cart .ast-icon svg,
body.tax-product_cat:not(.vc-gaming-home) .ast-site-header-cart .ast-icon svg *,
body.tax-product_cat:not(.vc-gaming-home) .ast-site-header-cart a.cart-container svg path,
body.post-type-archive-product:not(.vc-gaming-home) .ast-site-header-cart .ast-icon svg,
body.post-type-archive-product:not(.vc-gaming-home) .ast-site-header-cart .ast-icon svg *,
body.post-type-archive-product:not(.vc-gaming-home) .ast-site-header-cart a.cart-container svg path,
body.woocommerce-shop:not(.vc-gaming-home) .ast-site-header-cart .ast-icon svg,
body.woocommerce-shop:not(.vc-gaming-home) .ast-site-header-cart .ast-icon svg *,
body.woocommerce-shop:not(.vc-gaming-home) .ast-site-header-cart a.cart-container svg path,
body.woocommerce.archive:not(.vc-gaming-home) .ast-site-header-cart .ast-icon svg,
body.woocommerce.archive:not(.vc-gaming-home) .ast-site-header-cart .ast-icon svg *,
body.woocommerce.archive:not(.vc-gaming-home) .ast-site-header-cart a.cart-container svg path {
	color: #111111 !important;
	fill: #111111 !important;
	stroke: #111111 !important;
}

body.search:not(.vc-gaming-home) .vc-header-user a,
body.tax-product_cat:not(.vc-gaming-home) .vc-header-user a,
body.post-type-archive-product:not(.vc-gaming-home) .vc-header-user a,
body.woocommerce-shop:not(.vc-gaming-home) .vc-header-user a,
body.woocommerce.archive:not(.vc-gaming-home) .vc-header-user a {
	background: #ffffff !important;
	color: #111111 !important;
	border: 1px solid var(--vc-hdr-gold) !important;
	box-shadow: var(--vc-hdr-neon) !important;
}

/* Hamburger menu: oro (non arancio) */
.ast-mobile-menu-trigger-minimal .mobile-menu-toggle-icon,
.ast-mobile-menu-trigger-minimal .mobile-menu-toggle-icon .ast-mobile-svg,
.ast-button-wrap .menu-toggle .mobile-menu-toggle-icon,
.menu-toggle .mobile-menu-toggle-icon,
.ast-mobile-menu-buttons .menu-toggle,
body .ast-mobile-header-wrap .menu-toggle .mobile-menu-toggle-icon {
	color: var(--vc-hdr-gold) !important;
	fill: var(--vc-hdr-gold) !important;
}

.ast-mobile-menu-trigger-minimal .mobile-menu-toggle-icon .ast-mobile-svg line,
.menu-toggle .mobile-menu-toggle-icon svg line,
.menu-toggle .mobile-menu-toggle-icon svg rect,
.menu-toggle .mobile-menu-toggle-icon svg path {
	stroke: var(--vc-hdr-gold) !important;
	fill: var(--vc-hdr-gold) !important;
}

/* Card prodotto: bordo oro 1px + 1px di aria verticale tra contenitori */
.woocommerce ul.products,
.woocommerce-page ul.products,
ul.products {
	row-gap: 1px !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
ul.products li.product,
body.search ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_brand ul.products li.product,
body.post-type-archive-product ul.products li.product,
body.woocommerce-shop ul.products li.product {
	border: 1px solid var(--vc-hdr-gold) !important;
	border-width: 1px !important;
	border-radius: 12px !important;
	box-sizing: border-box !important;
	background-color: #fff !important;
	background-clip: padding-box !important;
	/* un solo tratto 1px (niente box-shadow che raddoppiava lo spessore) */
	box-shadow: none !important;
	outline: 0 none !important;
	/* evita che img/sfondi squadrati “mangino” il bordo in curva */
	overflow: hidden !important;
	/* 1px tra bordo inferiore e bordo superiore della card sotto */
	margin-top: 0 !important;
	margin-bottom: 1px !important;
	padding-bottom: 0 !important;
}

/* Astra float/grid: forza il micro-gap anche se il tema azzera i margin */
.woocommerce ul.products li.product.ast-article-post,
.woocommerce-page ul.products li.product.ast-article-post,
.woocommerce ul.products.columns-2 li.product,
.woocommerce ul.products.columns-3 li.product,
.woocommerce ul.products.columns-4 li.product,
.woocommerce ul.products.columns-5 li.product,
.woocommerce ul.products.columns-6 li.product {
	margin-bottom: 1px !important;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap,
.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link img,
.woocommerce ul.products li.product .woocommerce-LoopProduct-link img {
	border-top-left-radius: 11px !important;
	border-top-right-radius: 11px !important;
}

/* --- Mobile: ricerca + carrello stessa riga --- */
@media (max-width: 921px) {
	#ast-mobile-header .site-branding,
	#ast-mobile-header .ast-site-identity,
	#ast-mobile-header .custom-logo-link {
		overflow: visible !important;
	}

	#ast-mobile-header .custom-logo-link img.custom-logo,
	#ast-mobile-header .custom-logo {
		max-height: 52px !important;
		width: auto !important;
		height: auto !important;
		object-fit: contain !important;
	}

	.vc-header-user {
		font-size: 10.5px !important;
		font-weight: 600;
		gap: 4px;
		padding-left: 12px;
		padding-right: 12px;
	}

	.vc-header-user a {
		padding: 4px 7px !important;
		font-size: 10.5px !important;
		line-height: 1.2;
		border: 1px solid var(--vc-hdr-gold) !important;
	}

	#ast-mobile-header .ast-below-header-bar .ast-builder-grid-row,
	#ast-mobile-header .site-below-header-wrap .ast-builder-grid-row {
		display: flex !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		gap: 8px;
		padding-left: 12px !important;
		padding-right: 12px !important;
		box-sizing: border-box;
	}

	#ast-mobile-header .site-header-below-section-left {
		flex: 1 1 auto !important;
		min-width: 0 !important;
	}

	#ast-mobile-header .site-header-below-section-right {
		display: flex !important;
		flex: 0 0 auto !important;
		align-items: center;
		justify-content: flex-end;
		margin: 0 !important;
		padding: 0 !important;
		min-width: 44px;
	}

	#ast-mobile-header .ast-header-search,
	#ast-mobile-header .dgwt-wcas-search-wrapp {
		width: 100% !important;
		flex: 1 1 auto !important;
	}

	#ast-mobile-header .ast-header-woo-cart,
	#ast-mobile-header .ast-site-header-cart,
	#ast-mobile-header .ast-site-header-cart-li,
	#ast-mobile-header .ast-site-header-cart a.cart-container {
		display: flex !important;
		visibility: visible !important;
		pointer-events: auto !important;
	}

	#ast-mobile-header .ast-site-header-cart-li a {
		pointer-events: auto !important;
	}

	#ast-mobile-header .ast-site-header-cart .ast-addon-cart-wrap {
		min-width: 42px;
		min-height: 42px;
		display: flex !important;
		align-items: center;
		justify-content: center;
		border: 1px solid var(--vc-hdr-gold) !important;
	}
}
