/* =====================================================
   ShubhCraft — Header CSS (top bar + divine overrides)
   ===================================================== */

/* ----- Top bar ----- */
.sgc-topbar {
	font-size: 0.8125rem;
	width: 100%;
	border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* Full-bleed: pin contact to the far left and account links to the far
   right, matching the header edges (Storefront's .col-full would otherwise
   center this in a narrow band on wide screens). */
.sgc-site .sgc-topbar .sgc-topbar__inner,
.sgc-site .sgc-topbar .sgc-topbar__inner.col-full {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.4rem 1.5rem !important;
	gap: 1rem;
	flex-wrap: wrap;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

/* Storefront's .col-full clearfix pseudo-elements become flex items and
   push the real content toward the middle — remove them. */
.sgc-site .sgc-topbar .sgc-topbar__inner::before,
.sgc-site .sgc-topbar .sgc-topbar__inner::after {
	content: none;
}

.sgc-topbar__left,
.sgc-topbar__right {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-shrink: 0;
}

.sgc-topbar__phone,
.sgc-topbar__email {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 500;
}

.sgc-topbar__phone svg,
.sgc-topbar__email svg {
	width: 0.9rem;
	height: 0.9rem;
	fill: currentColor;
	flex-shrink: 0;
}

.sgc-topbar__email a {
	color: inherit;
	text-decoration: none;
}

.sgc-topbar__email a:hover {
	color: var(--sgc-gold-light);
}

/* ----- Login / logout ----- */
.sgc-auth-links {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 500;
	white-space: nowrap;
}

.sgc-auth-links a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
}

.sgc-auth-links a:hover,
.sgc-auth-links a:focus {
	color: var(--sgc-gold-light);
}

.sgc-auth-links__sep {
	opacity: 0.45;
	font-size: 0.75rem;
	user-select: none;
}

.sgc-header-auth {
	display: flex;
	align-items: center;
	font-size: 0.8125rem;
}

.sgc-header-auth .sgc-auth-links a {
	color: var(--sgc-maroon);
}

@media (max-width: 767px) {
	.sgc-header-auth {
		position: static;
		transform: none;
		font-size: 0.75rem;
		justify-self: end;
	}
}

@media (min-width: 768px) {
	.sgc-header-auth {
		grid-column: 3;
		grid-row: 1;
		justify-content: flex-end;
		padding-right: 0.5rem;
	}

	.sgc-site:not(:has(.sgc-topbar)) .site-header {
		grid-template-columns: auto 1fr auto auto auto;
	}

	.sgc-site:not(:has(.sgc-topbar)) .sgc-header-auth {
		grid-column: 3;
	}

	.sgc-site:not(:has(.sgc-topbar)) .site-header-cart {
		grid-column: 4;
	}

	.sgc-site:not(:has(.sgc-topbar)) .site-search {
		grid-column: 5;
	}
}

/* ----- Remove Storefront's default header gap on front page ----- */
.sgc-site.home .site-header,
.sgc-site.sgc-front-home .site-header,
.sgc-site.page-template-front-page .site-header {
	margin-bottom: 0 !important;
}

.sgc-site.home .site-content,
.sgc-site.sgc-front-home .site-content,
.sgc-site.page-template-front-page .site-content {
	padding-top: 0;
	margin-top: 0;
}

/* ----- Slim full-width main header ----- */
.sgc-site .site-header {
	z-index: 999;
	background: var(--sgc-ivory) !important;
	border-bottom: 1px solid rgba(212, 175, 55, 0.25);
	box-shadow: 0 1px 12px rgba(92, 26, 27, 0.05);
	padding-top: 0.55rem !important;
	padding-bottom: 0.55rem !important;
}

.sgc-site .site-header .col-full {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
	width: 100%;
	box-sizing: border-box;
}

.sgc-site .site-branding .site-title,
.sgc-site .site-branding .site-title a,
.sgc-site .site-branding .beta {
	color: var(--sgc-maroon) !important;
	font-family: var(--sgc-logo);
	font-weight: 700;
	letter-spacing: 0.05em;
	font-size: 1.25rem !important;
	line-height: 1.2 !important;
	margin: 0 !important;
}

.sgc-site .site-branding .site-title a:hover {
	color: var(--sgc-gold) !important;
}

.sgc-site .site-branding .site-description {
	display: none;
}

.sgc-site .site-branding img,
.sgc-site .site-branding .custom-logo {
	max-height: 2.75rem;
	width: auto;
	display: block;
}

/* Inline SVG + Cinzel preset logos */
.sgc-site .site-branding .sgc-brand-logo {
	margin: 0;
	line-height: 1;
}

.sgc-site .site-branding .sgc-brand-logo a {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	text-decoration: none;
	color: var(--sgc-maroon);
	transition: opacity 0.2s;
}

.sgc-site .site-branding .sgc-brand-logo a:hover {
	opacity: 0.85;
}

.sgc-brand-logo__name,
.sgc-brand-logo__shubh,
.sgc-brand-logo__craft {
	font-family: var(--sgc-logo);
	font-weight: 700;
	font-size: 1.35rem;
	letter-spacing: 0.06em;
	line-height: 1;
}

.sgc-brand-logo__mark {
	width: 2.1rem;
	height: 2.1rem;
	flex-shrink: 0;
	color: var(--sgc-accent-dk);
}

.sgc-brand-logo__mark--arch {
	width: 7.5rem;
	height: auto;
	color: var(--sgc-accent-dk);
}

.sgc-brand-logo__mark--diya {
	width: 1.15rem;
	height: 1.15rem;
	color: var(--sgc-accent-dk);
}

.sgc-brand-logo__rule {
	display: block;
	width: 3.5rem;
	height: 2px;
	margin-top: 0.35rem;
	background: var(--sgc-gradient-gold);
	border-radius: 1px;
}

.sgc-brand-logo__stack {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
}

.sgc-brand-logo--1 a {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
}

.sgc-brand-logo__split {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.sgc-brand-logo__shubh {
	color: var(--sgc-maroon);
}

.sgc-brand-logo__craft {
	color: var(--sgc-accent-dk);
}

.sgc-brand-logo__sep {
	display: inline-flex;
	align-items: center;
}

.sgc-site .main-navigation ul.menu > li > a {
	font-weight: 600;
	color: var(--sgc-maroon) !important;
	transition: color 0.2s;
	font-size: 0.875rem;
	padding: 0.35em 0.7em;
}

.sgc-site .main-navigation ul.menu > li > a:hover,
.sgc-site .main-navigation ul.menu > li.current-menu-item > a {
	color: var(--sgc-saffron) !important;
}

/* ----- Cart + search alignment ----- */
.sgc-site .site-header-cart {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
	position: relative;
}

.sgc-site .site-header-cart > li {
	display: flex;
	align-items: center;
	margin: 0;
}

.sgc-site .site-header-cart .cart-contents {
	display: inline-flex !important;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.8125rem;
	line-height: 1.3;
	padding: 0 !important;
	margin: 0;
	height: auto;
	color: var(--sgc-maroon);
	white-space: nowrap;
}

.sgc-site .site-header-cart .cart-contents .amount {
	margin-right: 0.25em;
	font-weight: 600;
}

.sgc-site .site-header-cart .cart-contents .count {
	opacity: 0.65;
}

.sgc-site .site-header-cart .cart-contents--empty {
	gap: 0;
	min-width: 1.25rem;
	justify-content: center;
}

.sgc-site .storefront-handheld-footer-bar .footer-cart-contents--empty .count {
	display: none;
}

.sgc-site .site-header-cart .cart-contents::after {
	display: inline-flex;
	align-items: center;
	line-height: 1;
	vertical-align: middle;
}

/* Mini-cart: fixed width; keep Storefront hide (left:-999em) until hover */
.sgc-site .site-header-cart .widget_shopping_cart {
	width: 320px !important;
	min-width: 280px;
	max-width: min(320px, calc(100vw - 2rem));
	box-sizing: border-box;
	border-radius: var(--sgc-radius);
	box-shadow: var(--sgc-shadow-soft);
	overflow: hidden;
	background: var(--sgc-white);
}

@media (min-width: 768px) {
	.sgc-site .site-header-cart > li:last-child {
		position: absolute;
		top: 100%;
		right: 0;
		left: auto;
		width: 320px;
		margin: 0;
		pointer-events: none;
	}

	.sgc-site .site-header-cart > li.focus ~ li {
		pointer-events: auto;
	}

	.sgc-site .site-header-cart .widget_shopping_cart {
		position: static;
		width: 100% !important;
		min-width: 0 !important;
		max-width: none !important;
		display: none !important;
	}

	.sgc-site .site-header-cart > li.focus ~ li .widget_shopping_cart {
		display: block !important;
	}

	/* Expand list only when open — fixes subtotal overlap without showing cart by default */
	.sgc-site .site-header-cart .widget_shopping_cart .product_list_widget {
		height: 0 !important;
		overflow: hidden;
	}

	.sgc-site .site-header-cart > li.focus ~ li .widget_shopping_cart .product_list_widget {
		height: auto !important;
		overflow: visible;
	}
}

@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
	.sgc-site .site-header-cart:hover > li:last-child {
		pointer-events: auto;
	}

	.sgc-site .site-header-cart:hover > li:last-child .widget_shopping_cart {
		display: block !important;
	}

	.sgc-site .site-header-cart:hover > li:last-child .widget_shopping_cart .product_list_widget {
		height: auto !important;
		overflow: visible;
	}
}

.sgc-site .site-header-cart .widget_shopping_cart .widget_shopping_cart_content {
	display: flex;
	flex-direction: column;
}

.sgc-site .site-header-cart .widget_shopping_cart .product_list_widget li {
	display: block;
	position: relative;
	padding: 0.75rem 1rem 0.75rem 1.75rem !important;
	overflow: hidden;
	line-height: 1.4;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sgc-site .site-header-cart .widget_shopping_cart .product_list_widget li::after {
	content: "";
	display: table;
	clear: both;
}

.sgc-site .site-header-cart .widget_shopping_cart .product_list_widget li a.remove {
	position: absolute !important;
	left: 0.5rem !important;
	top: 0.85rem !important;
	float: none !important;
	margin: 0;
}

.sgc-site .site-header-cart .widget_shopping_cart .product_list_widget img {
	float: right !important;
	width: 48px !important;
	max-width: 48px !important;
	height: auto;
	margin: 0 0 0 0.65rem !important;
}

.sgc-site .site-header-cart .widget_shopping_cart .product_list_widget .quantity {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.8125rem;
	opacity: 0.75;
}

.sgc-site .site-header-cart .widget_shopping_cart p.total {
	order: 2;
	margin: 0 !important;
	padding: 0.75rem 1rem !important;
	text-align: left;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	background: rgba(0, 0, 0, 0.03);
}

.sgc-site .site-header-cart .widget_shopping_cart p.buttons {
	order: 3;
	margin: 0 !important;
	padding: 0.75rem 1rem 1rem !important;
}

.sgc-site .site-header-cart .widget_shopping_cart .buttons {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sgc-site .site-header-cart .widget_shopping_cart .buttons a {
	display: block;
	width: 100%;
	margin: 0 !important;
	text-align: center;
	white-space: nowrap;
	box-sizing: border-box;
}

.sgc-site .site-search {
	display: flex;
	align-items: center;
	font-size: 0.8125rem;
}

.sgc-site .site-search .widget,
.sgc-site .site-search .widget_product_search {
	margin: 0;
	width: 100%;
}

.sgc-site .site-search .widget_product_search form,
.sgc-site .site-search .widget_product_search form:not(.wp-block-search) {
	position: relative;
	margin: 0;
	display: flex;
	align-items: center;
}

.sgc-site .site-search .widget_product_search form::before,
.sgc-site .site-search .widget_product_search form:not(.wp-block-search)::before {
	position: absolute;
	top: 50%;
	left: 0.85em;
	transform: translateY(-50%);
	margin: 0;
	line-height: 1;
	color: var(--sgc-muted);
	pointer-events: none;
}

.sgc-site .site-search .widget_product_search input[type="search"],
.sgc-site .site-search .widget_product_search input[type="text"],
.sgc-site .site-search .widget_product_search form:not(.wp-block-search) input[type="search"],
.sgc-site .site-search .widget_product_search form:not(.wp-block-search) input[type="text"] {
	width: 100%;
	height: 34px;
	padding: 0 0.85rem 0 2.1rem !important;
	font-size: 0.8125rem;
	line-height: 34px;
	border-radius: 2rem;
	border: 1px solid rgba(212, 175, 55, 0.35) !important;
	background: var(--sgc-white);
	box-shadow: none !important;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
}

.sgc-site .site-search .widget_product_search input[type="search"]:focus,
.sgc-site .site-search .widget_product_search input[type="text"]:focus {
	border-color: var(--sgc-gold) !important;
	box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15) !important;
}

/* Desktop: single slim row — logo | nav | cart | search */
@media (min-width: 768px) {
	.sgc-site .site-header {
		display: grid;
		grid-template-columns: auto 1fr auto auto;
		align-items: center;
		column-gap: 1.25rem;
		padding: 0.5rem 0 !important;
	}

	.sgc-site .site-header > .col-full,
	.sgc-site .storefront-primary-navigation,
	.sgc-site .storefront-primary-navigation > .col-full {
		display: contents;
	}

	.sgc-site .site-branding {
		grid-column: 1;
		grid-row: 1;
		width: auto !important;
		float: none !important;
		margin: 0 !important;
		padding-left: 1.5rem;
	}

	.sgc-site .main-navigation {
		grid-column: 2;
		grid-row: 1;
		width: auto !important;
		float: none !important;
		margin: 0 !important;
		clear: none !important;
	}

	.sgc-site .main-navigation ul.menu {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: center;
		gap: 0.15rem;
		margin: 0;
	}

	.sgc-site .main-navigation ul.menu > li {
		margin: 0;
	}

	.sgc-site .site-header-cart {
		grid-column: 3;
		grid-row: 1;
		width: auto !important;
		float: none !important;
		align-self: center;
		padding-right: 0.75rem;
	}

	.sgc-site .site-search {
		grid-column: 4;
		grid-row: 1;
		display: flex !important;
		align-items: center;
		align-self: center;
		width: 220px !important;
		min-width: 200px;
		float: none !important;
		margin: 0 !important;
		clear: none !important;
		padding-right: 1.5rem;
	}

	.sgc-site .menu-toggle {
		display: none;
	}

	.sgc-site .handheld-navigation {
		display: none;
	}
}

/* Tablet/mobile: logo + cart + menu on row 1, full-width search on row 2 */
@media (max-width: 767px) {
	.sgc-site .site-header {
		display: grid;
		grid-template-columns: minmax(min-content, 1fr) auto auto;
		grid-template-areas:
			"brand cart menu"
			"search search search";
		align-items: center;
		column-gap: 0.5rem;
		row-gap: 0.5rem;
		padding: 0.5rem 1rem !important;
		position: relative;
		overflow: visible;
	}

	.sgc-site .site-header:has(.sgc-header-auth) {
		grid-template-columns: minmax(min-content, 1fr) auto auto auto;
		grid-template-areas:
			"brand auth cart menu"
			"search search search search";
	}

	.sgc-site .site-header > .col-full,
	.sgc-site .storefront-primary-navigation,
	.sgc-site .storefront-primary-navigation > .col-full {
		display: contents;
	}

	/* display:contents lifts clearfix pseudo-elements into the grid */
	.sgc-site .site-header > .col-full::before,
	.sgc-site .site-header > .col-full::after,
	.sgc-site .storefront-primary-navigation::before,
	.sgc-site .storefront-primary-navigation::after,
	.sgc-site .main-navigation::before,
	.sgc-site .main-navigation::after {
		content: none !important;
		display: none !important;
	}

	.sgc-site .site-branding {
		grid-area: brand;
		float: none !important;
		width: auto !important;
		max-width: none;
		margin: 0 !important;
		min-width: min-content;
		justify-self: start;
	}

	.sgc-site .site-branding .site-title,
	.sgc-site .site-branding .site-title a,
	.sgc-site .site-branding .beta,
	.sgc-site .site-branding h1,
	.sgc-site .site-branding h1 a {
		white-space: nowrap;
	}

	.sgc-site .secondary-navigation {
		display: none;
	}

	.sgc-site .site-search {
		grid-area: search;
		float: none !important;
		width: 100% !important;
		margin: 0 !important;
		clear: none !important;
		display: flex !important;
		align-items: center;
	}

	.sgc-site .sgc-header-auth {
		grid-area: auth;
	}

	.sgc-site .site-header-cart {
		grid-area: cart;
		position: static !important;
		transform: none !important;
		width: auto !important;
		justify-self: end;
		align-self: center;
		z-index: 3;
		flex-wrap: nowrap;
	}

	/* Mini-cart dropdown: fully removed from flex/grid until tapped (prevents title squeeze). */
	.sgc-site .site-header-cart > li:last-child {
		display: none !important;
	}

	.sgc-site .site-header-cart .widget_shopping_cart,
	.sgc-site .site-header-cart .widget_shopping_cart .product_list_widget {
		display: none !important;
		height: auto !important;
		max-height: none;
		overflow: visible;
	}

	.sgc-site .main-navigation {
		grid-area: menu;
		float: none !important;
		width: auto !important;
		clear: none !important;
		margin: 0 !important;
		position: relative;
		justify-self: end;
	}

	.sgc-site .main-navigation .primary-navigation {
		display: none;
	}

	.sgc-site .site-header .skip-link {
		position: absolute;
	}

	.sgc-site .menu-toggle {
		float: none;
		width: 2.25rem;
		height: 2.25rem;
		min-width: 0;
		max-width: none;
		margin: 0;
		padding: 0;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		border: none;
		border-radius: 0.35rem;
		background: transparent;
		box-shadow: none;
		color: var(--sgc-maroon);
		font-size: 0;
		line-height: 1;
	}

	.sgc-site .menu-toggle span {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.sgc-site .menu-toggle::before,
	.sgc-site .menu-toggle::after,
	.sgc-site .menu-toggle span::before {
		left: 50%;
		margin-left: -6px;
		width: 12px;
		background-color: currentColor;
	}

	.sgc-site .handheld-navigation {
		position: absolute;
		top: calc(100% + 0.35rem);
		right: 0;
		left: auto;
		clear: none;
		z-index: 1000;
		min-width: 12rem;
		overflow: visible;
		max-height: none;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-0.35rem);
		pointer-events: none;
		background: var(--sgc-ivory);
		border: 1px solid rgba(212, 175, 55, 0.35);
		border-radius: var(--sgc-radius);
		box-shadow: var(--sgc-shadow-soft);
		transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
	}

	.sgc-site .main-navigation.toggled .handheld-navigation {
		max-height: none;
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		pointer-events: auto;
		transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
	}

	.sgc-site .handheld-navigation ul {
		margin: 0;
		padding: 0.35rem 0;
		list-style: none;
	}

	.sgc-site .handheld-navigation ul > li > a {
		display: block;
		padding: 0.5rem 1rem;
		color: var(--sgc-maroon) !important;
		font-weight: 600;
		font-size: 0.875rem;
	}
}

@media (max-width: 420px) {
	.sgc-site .site-header {
		column-gap: 0.35rem;
	}

	.sgc-site .site-header-cart .cart-contents {
		font-size: 0.75rem;
		gap: 0.2rem;
	}

	.sgc-site .site-branding .site-title,
	.sgc-site .site-branding .site-title a {
		font-size: 1.05rem !important;
	}
}

@media (max-width: 767px) {
	.sgc-topbar__inner {
		justify-content: space-between;
	}
}

@media (max-width: 480px) {
	.sgc-topbar__left,
	.sgc-topbar__right {
		font-size: 0.75rem;
	}
}
